QML element resize cause flicker on MacOS
-
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.
code_text
Window { width: 500 height: 500 visible: true Rectangle { anchors.fill: parent color: "red" } }
This may be a platform specific issue since "software" render backend is okay while use default render backend(Metal) will cause this problem.
I would appreciate it if you could give me an another workaround since I must use Metal to render my app.