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. Modal dialog over OpenGL widget: openGL surface doesn't get redrawn and a mess is left behind
QtWS25 Last Chance

Modal dialog over OpenGL widget: openGL surface doesn't get redrawn and a mess is left behind

Scheduled Pinned Locked Moved General and Desktop
modal dialogopenglqglwidget
5 Posts 3 Posters 2.0k Views
  • 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.
  • F Offline
    F Offline
    floatingWoods
    wrote on last edited by floatingWoods
    #1

    Hello,

    I have a QGLWidget, and on top of it sometimes modal dialogs. In rare cases (depending on the Platform/settings), moving the modal dialog doesn't redraw the openGL window's content, and leaves a mess behind, in the openGL view. What can I do?
    As stated, this happens in rare cases. On Windows, Mac and Linux in works fine in 90% of tested machines.

    The paintEvent and paintGL functions are overridden, and empty (I am rendering on a regular time base). But they anyway don't get called when the modal dialog moves over it.

    Thanks for any insight!

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

      Hi,

      Are you using exec to show your dialog ? If so, you could try with open

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

      1 Reply Last reply
      0
      • F Offline
        F Offline
        floatingWoods
        wrote on last edited by
        #3

        Thank you for your reply.
        Yes, I am using exec to show the dialog, but open gives the same result.
        What else could I try? The problem is that those artifacts are not expected for a professional application, but I am at a loss in trying to find the reason and to fix it.
        Thanks again

        1 Reply Last reply
        0
        • JKSHJ Offline
          JKSHJ Offline
          JKSH
          Moderators
          wrote on last edited by
          #4

          Hi @floatingWoods,

          There are many known issues with QGLWidget. It is now deprecated, replaced with QOpenGLWidget. Try that instead, and see if it helps.

          Qt Doc Search for browsers: forum.qt.io/topic/35616/web-browser-extension-for-improved-doc-searches

          1 Reply Last reply
          0
          • F Offline
            F Offline
            floatingWoods
            wrote on last edited by
            #5

            Thank you for your reply.
            Yes, that is probably the best to do. It will however require to switch to Qt5.4, and that is a larger endeavour. Will try that.

            Thanks again!

            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