Important: Please read the Qt Code of Conduct -

QOpenGLWidget Performance Issue

  • When combining a QOpenGLWidget with a regular QWidget on the same form, performance is impaired such that interaction with the other widgets is 'sluggish'.

    Below is an example:

    • With QGLWidget, slider dragging the slider is 'snappy'
    • With QOpenGLWidget, slider dragging is 'sluggish'
        QSlider *testWidget = new QSlider(Qt::Horizontal, this);
        QOpenGLWidget* oglWidget = new QOpenGLWidget(this);
        //QGLWidget* oglWidget = new QGLWidget(this);

    My questions are:

    • Why is QOpenGLWidget behavior so different?
    • Is there a configuration for QOpenGLWidget that provides for 'more responsive' rendering?
    • Is QGLWidget still viable for new development, even though deprecated?

    EDIT :

    • Windows 10
    • Qt Versions 5.5 and 5.7

    EDIT 3 :
    These open bug report might explain the cause of the issue: ~ "QOpenGLWidget"

    Wrapping in native QWindow has issues.

    Is there a solution that still uses QOpenGLWidget (i.e. some way to disable scene composition with other widgets? )


  • Lifetime Qt Champion

    Hi and welcome to devnet,

    You should also add which version of Qt you are using as well as the OS you are running.

    In any case, you should take a look a the bug report system to see if there's something about it.

Log in to reply