Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-60896

Changing top-level parent of a QOpenGLWidget when the QOpenGLWidget is not visible doesn't work

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P3: Somewhat important
    • 5.9.2
    • 5.6.2, 5.8.0, 5.9
    • GUI: OpenGL
    • None
    • Windows 10, Linux

      NVidia drivers
    • fd897629bf698c9efb4628188db79f2937ef3d89

    Description

      Moving a QOpenGLWidget between top-level parents when the QOpenGLWidget is not visible causes the QOpenGLWidget to stop rendering.  The attached patch to the manual qopenglwidget test demonstrates the issue.

      There's 2 odd behaviors that I have noticed.

      To reproduce the first:

      1. Launch the test app
      2. In the "Tabs" MDI window, click the "Not OpenGL" tab
      3. Click Tools -> Toggle tab widget parent. The tab widget is moved to a second top-level window. The "Not OpenGL" tab remains active.
      4. Click the "OpenGL" tab. The OpenGL widget is black.

      To reproduce the second:

      1. Launch the test app
      2. Take note: The triangle in the OpenGL tab widget is spinning along the X axis.  The red point is spinning from the top to the bottom of the widget.
      3. Click Tools -> Toggle tab widget parent.  The tab widget is moved to a second top-level window.  The "OpenGL" tab is active.
      4. Change tabs to the "Not OpenGL" tab.
      5. Click Tools -> Toggle tab widget parent. The tab widget moves back into the MDI subwindow.
      6. Click the OpenGL tab.  Take note: the triangle is now spinning along the Z axis.  It appears to be rendering the same texture as the MDI subwindow with the "33 ms timer" title.  This can be confirmed by resizing the "33 ms timer" subwindow to be small, and the "Tabs" subwindow to be large.  The "Tabs" OpenGL widget appears very pixelated, because it is using the small texture of the "33 ms timer" widget.

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            iamsergio Sergio Martins
            chrisburel Chris Burel
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes