Qt opengl glTexImage2D in a widget

Hello everyone!

So for now, I was doing an OpenGL display, where I render in an opengl context (GLUT) .

But now I would like to integrate it into a big project that does not use the Qt OpenGL API at all (QGLWidget, QOpenGLWidget, …).

So I would have to display on QWidget for example using the function glTexImage2D () because it can take a Qimage input ((GLvoid *) Qimage.bits ())

Thank you for your help !