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

Resizing a native QOpenGLWidget/embedded QOpenGLWindow causes visual glitches

XMLWordPrintable

      Code

      #include <QtWidgets>
      #include <QOpenGLWidget>
      
      int main(int argc, char *argv[])
      {
          QApplication a(argc, argv);
      
          QMainWindow w;
          w.setCentralWidget(new QOpenGLWidget);
          w.addDockWidget(Qt::LeftDockWidgetArea, new QDockWidget);
          w.menuBar()->addAction("WA_NativeWindow", [&w] {
              w.centralWidget()->setAttribute(Qt::WA_NativeWindow);
              w.menuBar()->setStyleSheet("background: red;");
          });
          w.resize(240, 180);
          w.show();
      
          return a.exec();
      }
      

       

      Steps to reproduce

      1. Build and run the code above
      2. Grab the splitter handle and wiggle it rapidly
      3. Click the menu item, "WA_NativeWindow"
      4. Repeat Step #2

       

      Outcomes
      Step 2 is very smooth, but Step #4 is glitchy (see attached video).

       

      Notes

      • Qt 6.5.1 is affected by QTBUG-113652 so the patch needs to applied first to see the effect.
      • The severity of the glitching seems to be hardware dependent.
        • The customer sees it very strongly on Dell XPS 15 9510, i7-11800H, RTX 3050 Ti, Win11 22H2
        • Not so strong on i9-9900K, Geforce GTX 980, Win10
        • Not so strong on i9-10980XE, Win11 22H2

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

            tokorpip Tomi Korpipää
            skoh-qt Sze Howe Koh
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes