Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. There is something wrong with QOpenGLWidget
Qt 6.11 is out! See what's new in the release blog

There is something wrong with QOpenGLWidget

Scheduled Pinned Locked Moved Unsolved General and Desktop
8 Posts 3 Posters 1.8k Views 2 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • J Offline
    J Offline
    Jerry Le
    wrote on last edited by
    #1

    I wrote several small programs with QOpenGLWidget, which could be run independently about two months ago.
    Today, I want to use them and find that these softwares can be opened (no .dll missing), but once it was involved in the opengl interface, it would get stuck and crash (kind of like entering a dead loop).
    I put opengl32.dll into the root directory, and then I use qdebug to locate the problem whiling show() triggered. A large number of debug info: "Failed to make context current." "QOpenGLWidget: Failed to make context current" "composeAndFlush: makeCurrent() failed"
    The opengl demo from qt creator is not successful either.
    I tried to uninstall qt and install qt again but it didnt work.
    ps: Softwares work perfectly on my colleague's computer.
    I really want to know what happened. My environment is QT5.11.1 + MSVC2017 +Win11x64. I guess something is changed in these two months but I dont know how to deal

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi and welcome to devnet,

      One possible thing is an update to your graphics driver. You should start by checking this. Then either upgrade or downgrade it depending if it's the latest version or if a new one is available.

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      J 1 Reply Last reply
      0
      • SGaistS SGaist

        Hi and welcome to devnet,

        One possible thing is an update to your graphics driver. You should start by checking this. Then either upgrade or downgrade it depending if it's the latest version or if a new one is available.

        J Offline
        J Offline
        Jerry Le
        wrote on last edited by
        #3

        @SGaist Thanks for your suggestion. I tried to copy opengl32.dll from the computer of my colleague where the softwares run perfectly. The result was not good.

        1 Reply Last reply
        0
        • SGaistS Offline
          SGaistS Offline
          SGaist
          Lifetime Qt Champion
          wrote on last edited by
          #4

          Because that is not the driver for your graphics card. That's the thing you should check.

          Interested in AI ? www.idiap.ch
          Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

          J 1 Reply Last reply
          0
          • SGaistS SGaist

            Because that is not the driver for your graphics card. That's the thing you should check.

            J Offline
            J Offline
            Jerry Le
            wrote on last edited by
            #5

            @SGaist However, softwares depending on QGraphicsscene and opengl are ok

            1 Reply Last reply
            0
            • SGaistS Offline
              SGaistS Offline
              SGaist
              Lifetime Qt Champion
              wrote on last edited by
              #6

              What exactly are you doing with that widget ?

              Interested in AI ? www.idiap.ch
              Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

              J 1 Reply Last reply
              0
              • SGaistS SGaist

                What exactly are you doing with that widget ?

                J Offline
                J Offline
                Jerry Le
                wrote on last edited by
                #7

                @SGaist said in There is something wrong with QOpenGLWidget:

                What exactly are you doing with that widget ?

                I'm sure that I did nothing. Also the demo of qt creator which use QOpenGLWidget don't work.

                JoeCFDJ 1 Reply Last reply
                0
                • J Jerry Le

                  @SGaist said in There is something wrong with QOpenGLWidget:

                  What exactly are you doing with that widget ?

                  I'm sure that I did nothing. Also the demo of qt creator which use QOpenGLWidget don't work.

                  JoeCFDJ Offline
                  JoeCFDJ Offline
                  JoeCFD
                  wrote on last edited by
                  #8

                  @Jerry-Le QT5.11.1 is kind of old. Get a newer version of QT(for example above 5.15.2)

                  Troubleshooting Steps:
                  Update Drivers: Ensure that your graphics drivers are up to date.
                  Check OpenGL Version: Verify that your system supports the required OpenGL version.
                  Qt Settings: Review your Qt configuration, particularly the OpenGL settings.
                  Environment Variables: Try setting QT_OPENGL=angle or QT_OPENGL=software as a temporary workaround.
                  Application Logs: Check the application logs for more detailed error messages that might point to the root cause.

                  1 Reply Last reply
                  0

                  • Login

                  • Login or register to search.
                  • First post
                    Last post
                  0
                  • Categories
                  • Recent
                  • Tags
                  • Popular
                  • Users
                  • Groups
                  • Search
                  • Get Qt Extensions
                  • Unsolved