QGLWidget problem
-
Hello guys,
I am developing an OpenGL application using Qt. Until yesterday I was subclassing
QOpenGLWidget
to create my custom widget but after adding It to the main application which is aQMainWindow
with a few buttons and threeQGraphicsView
it runs really slow. I have tried usingQGLWidget
and the application runs the same as without the OpenGL widget.The problem I have is that the widget that I've made subclassing
QGLWidget
does not resize properly (or at least the OpenGL rendering area doesn't).I will give you an example using hellogl2 example from Qt 5.5.
Using
QOpenGLWidget
I get:
Using
QGLWidget
I get:
I just changed the parent class from
QOpenGLWidget
toQGLWidget
the rest of the code is the same. The same thing happens in my aplication.I have tried to find a solution but I could not. May someone tell me why is this happening and how to solve it?
Thank you,
Catalin