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

WindowContainer doesn't respect Z order

    XMLWordPrintable

Details

    • macOS, Windows

    Description

      WindowContainer is always the top-level item in a QML scene, even tho it shouldn't be.
      I tested all kinds of variations of Z value for different items, different window flags to no avail.

      Simple repo case attached.
      Ping: vestbo

       

      import QtQuick
      import QtQuick.Controls
      import QtQuick.Window
      Window {
          id: root
          visible: true
          width: 800
          height: 600
          title: qsTr("WindowContainer test")
          Rectangle {
              width: parent.width
              anchors.top: parent.top
              height: 100
              color: "purple"
              z: 100
              Text {
                  anchors.centerIn: parent
                  font.pixelSize: 24
                  text: "MY AWESOME TOP BAR"
                  color: "white"
              }
          }
          ScrollView {
              ScrollBar.vertical.policy: ScrollBar.AlwaysOn
              anchors.fill: parent
              clip: true
              Column {
                  width: 500
                  Repeater {
                      model: 4
                      Rectangle {
                          width: parent.width
                          height: 200
                          color: "pink"
                          Rectangle {
                              anchors.bottom: parent.bottom
                              width: parent.width
                              height: 5
                              color: "black"
                          }
                      }
                  }
                  Item {
                      width: 500
                      height: 300
                      WindowContainer {
                          id: webView
                          anchors.fill: parent
                          window: Window {
                              flags: Qt.WindowTransparentForInput | Qt.FramelessWindowHint
                              color: "lightgray"
                              Image {
                                  source: "https://placedog.net/500/500?random"
                                  anchors.fill: parent
                              }
                          }
                      }
                  }
                  Repeater {
                      model: 4
                      Rectangle {
                          width: parent.width
                          height: 200
                          color: "red"
                          Rectangle {
                              anchors.bottom: parent.bottom
                              width: parent.width
                              height: 5
                              color: "black"
                          }
                      }
                  }
              }
          }
      }
      

       

      Attachments

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

        Activity

          People

            vestbo Tor Arne Vestbø
            b0bben Bob Jelica
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes