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

QML element resize cause flicker on MacOS

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P2: Important
    • None
    • 5.15.12, 6.2.3, 6.3.2, 6.4.0
    • Qt RHI
    • None
    • MacOS Monterey 12.5 , Apple M1 Pro, Metal GPUFamily Apple 7
    • macOS
    • 401edea98 (dev), fa3bfa72d (dev)

    Description

      1. Details

      Create Rectangle element. On resize, the entire window will flicker (briefly filled with white color). If other elements are present on the scene, they will flicker too.

      This happens on Mac OS X. And even a simple code snippet like follows can cause this problem.

      I produce a whole example in attachment. Please pay more attention to RIGHT BORDER in the video. When I drag left border from left to right, the right border will flicker. Same behavior on bottom border.  Same behavior on custom  QQuickPaintedItem with "fillColor"  property setting to "red".  Same behavior on WebEngineView. And all  WebEngineView  related QT Tutorial could reproduce this flicker problem.

      In fact, there is always an awful behavior when resizing qml item on MacOS 12.5.

       

      Window {
          width: 500
          height: 500
          visible: true
          Rectangle {
              anchors.fill: parent
              color: "red"
          }
      }
      2. Affected Version

      Almost all LTS version will cause this problem.

      3. Workaround I found

      When I set render type to "software" as follow snippet , the problem goes away. 

      QQuickWindow::setGraphicsApi(QSGRendererInterface::Software);
      
      4. My Guess

      This may be a platform specific issue since "software" render backend is okay while use default render backend(Metal) will cause this problem.

      5. The End

      I would appreciate it if you could give me an another workaround since I must use Metal to render my app.

      Attachments

        Issue Links

          Activity

            People

              lagocs Laszlo Agocs
              yunuszhang XiaoMing Zhang
              Votes:
              1 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

                Created:
                Updated: