QOPenGLContext: how to create a context inside a QOpenGLWidget?
-
Can someone give me a example like: how to create a context inside a QOpenGLWidget?
Because i need to use the function QOpenGLContext::swapbuffers. And i have a function that needs to draw some stuff in the screen, and i realize that i need to use that function. I dont find another way to do it. I read some examples like http://doc.qt.io/qt-5/qtgui-openglwindow-example.html but appears different working when aplied a QWindow.
Thanks! -
That example is using QWindow, should not be used with widgets, but as a standalone window.
Check this docs instead http://doc.qt.io/qt-5/qopenglwidget.html#details
-
@johngod I already read all the documentation of qopenglwidget. But i need draw some stuff without call paintGL. And i cant find a way to do it.
I'm lost. Any tips help me to find a way i will be graiteful.
Att