Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

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 a QMainWindow with a few buttons and three QGraphicsView it runs really slow. I have tried using QGLWidget 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:
    alt text

    Using QGLWidget I get:
    alt text

    I just changed the parent class from QOpenGLWidget to QGLWidget 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


Log in to reply