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

QOpenGLWidget does not update when content changed while its hidden

    XMLWordPrintable

Details

    • macOS, Windows
    • 1ea73bc29b (qt/qtbase/dev) 1ea73bc29b (qt/tqtc-qtbase/dev) 6b1e2e1079 (qt/qtbase/6.2) 46fefd3d30 (qt/qtbase/6.3) 6b1e2e1079 (qt/tqtc-qtbase/6.2) 46fefd3d30 (qt/tqtc-qtbase/6.3) 46fefd3d30 (qt/tqtc-qtbase/6.3.0)

    Description

      Due to change in https://codereview.qt-project.org/#/c/141307/ when a QOpenGLWidget content is updated while its hidden, the correct content will not be shown when the widget is made visible after. This is because, the new variable 

      renderToTextureReallyDirty

      is never set to true when it is updated while the widget is hidden.

       

      Attached is a test app to repo the issue. Please follow these steps to see the issue mentioned

      1) Click on the button and notice the red rectangle will change position on every click. The label below indicates the corner position of the rectangle

      2) Now, uncheck the checkbox and notice QOpenGLWidget will be hidden.

      3) Now click the button again so that the rect position will be changed. Ensure its not the same position before the widget was made hidden by looking at the label

      4) Now check on the checkbox and notice the red rectangle's position never got updated to the one indicated by the label

       

      And here is the patch I used to make it work

      qtOpenGlWidget.diff

      Attachments

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

        Activity

          People

            lagocs Laszlo Agocs
            nanthiran2005 sivan nanthiran
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes