Qt opengl glTexImage2D in a widget

For now, I was doing an OpenGL visualization, where I render in an openGL context (GLUT).

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

So I would have to show in QWidget, for example, using the function glTexImage2D () because it can take a Qimage entry ((GLvoid *) Qimage.bits ())

Thanks for your help !