Details
-
Bug
-
Resolution: Fixed
-
P2: Important
-
5.15.9
-
-
aeedbf923d9ed39db34e36b424602321974f2aa2
Description
When rendering a custom QQuickItem with opengl/d3d12 backend, the z-order is invalid. This can be seen when drawing for example "Button" qml component, the custom item is rendered in between the Button's text and the background rectangle.
This can be reproduced with the rendernode example by adding a simple "Button" after the custom item:
Rectangle { id: clipper width: parent.width / 2 height: parent.height / 2 anchors.centerIn: parent border.color: "yellow" border.width: 2 color: "transparent" NumberAnimation on rotation { id: nonRectClipAnim from: 0; to: 360; duration: 5000; loops: Animation.Infinite running: false } //! [3] CustomRenderItem { <snip> } //! [3] Button { text: "test" y: parent.y + 20 } //Slider { // //text: "test" // y: parent.y + 20 //} }
Some other components such as Slider, Text, WebView are properly rendered on top of the custom item in this scenario.
When using "software" backend
QQuickWindow::setSceneGraphBackend(QSGRendererInterface::GraphicsApi::Software);
the issue does not reproduce.
Attached screenshot of the problematic situation.