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

Invalid z-order when rendering custom QQuickItem with opengl/d3d12 backend

    XMLWordPrintable

Details

    • Windows
    • 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.

      Attachments

        1. qtbug102954_2.png
          qtbug102954_2.png
          334 kB
        2. qtbug102954.png
          qtbug102954.png
          202 kB
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            lagocs Laszlo Agocs
            jussi_witick Jussi Witick
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes