Qt World Summit: Register Today!

QOpenGLWidget FullScreen problem

  • I met a strange phenomenon. a simple widget with nothing but contains a QOpenGLWidget Window, when the application is in full screen, if
    I press the windows key on keyboard, the menu can not pop up, and the application will flash once. I create a menu in response to the right mouse button, it was also not pop up. when the application is not in full screen, it has no such problem. so, how can I to solve it, thanks for reply.

  • Lifetime Qt Champion


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

  • I run my application on windows 7, I am using Qt5.4.1, then I used Qt5.6.2 Qt5.7.1 Qt5.8 to verify this phenomenon, all the same, so I confused.

  • Lifetime Qt Champion

    Do you know if you are using the Angle backend or the desktop OpenGL ?

  • I am sorry for knowing nothing for that . After I did some search, I found if I add a code like that
    QCoreApplication::setAttribute(Qt::AA_UseSoftwareOpenGL) or QCoreApplication::setAttribute(Qt::AA_UseOpenGLES) at the first of main funtion , then application works well on the version of Qt5.6.2 Qt5.7.1 Qt5.8 I own , but failed in Qt 5.4.1 .

  • Lifetime Qt Champion

    For Qt 5.4.1 that might be related to the version of Angle. Note that this version of Qt is currently old, if you need LTS then you should go with the 5.6 series.

Log in to reply