Important: Please read the Qt Code of Conduct -

Qt 5.10.0 to 5.12.1 upgrade introduces problems in OpenGL displays

  • I've long had two different Open GL displays that I use in my Qt application which have worked quite well through many Qt version upgrades.

    Recently I upgraded from 5.10.0 to 5.12.1 and suddenly I am encountering problems with both displays I am wondering if there have been some sort of architectural changes - either to Qt's implementation of OpenGL or to Qt displays in general -- between 5.10.0 and 5.12.1 that might explain these and if someone can can suggest an area to investigate.

    The first display draws a 3d surface map.

    class GLAdapterWidget : public QGLWidget

    It loads a heightmap and uses OpenGL to render it. But after the upgrades to 5.12.1, once the heightmap is loaded, it still does not drawl will not draw the surface. The display appears black. Until I click the mouse somewhere within its borders. Then it appears perfectly.

    (I was able to at least track this down to a problem with the widget attribute Qt::WA_Mapped . Until I click within the widget, that attribute is not set. Once I do, Qt sets it and it draw. I have no idea why or what this means.)

    The second display just shows an image:

    class VideoDisplay : public QOpenGLWidget, 
                         protected QOpenGLFunctions_3_3_Core

    This one seems to show up well until I choose another display and then come back to it. At that point, it appears black and nothing can make it redraw

    I realize that's not a lot to go on. This code so sold and large and well established that posting all of it would probably mostly cloud the issue.

    What I'm hoping is that someone can identify any particular changes which might be a culprit here and give me some general guidance as to what to do or how to work around either of these?


  • Lifetime Qt Champion


    What OS are you running ?
    Can you check whether you have the same issue with 5.12.0 ?

  • Hi,

    Thank you for replying. It actually takes a while for me to integrate any version of Qt into our build so I was unable to test with 5.12.0 until now.

    The answers to your questions are:

    • I am running Windows 10 with all the latest updates.
    • Yes the problem happens with 5.12.0 also so whatever changes made this happen came with or before that version


  • Lifetime Qt Champion

    Then I would check with 5.11, just to be sure.

    Is it still working with 5.10 ? If you had a graphics card driver update, it might also break stuff.

  • It still works with 5.10.0. We had to go back to that.

    I can download and try 5.11. But If I find it does or does not, what would that mean?

  • Lifetime Qt Champion

    That there's a regression that started with that version.

    You may want to check the bug report system to see if there's anything related.

  • @SGaist I haven't been able to go to 5.11 because, as I mentioned, getting Qt into our particular build system is something of a task. But I am still going to try it. In the meantime, I was pointed to this reported bug which sounds somewhat similar...

  • Lifetime Qt Champion

    Good finding !

    Then you should add a comment to the report with your informations.

Log in to reply