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

Z-ordering is broken

    XMLWordPrintable

Details

    • Bug
    • Resolution: Duplicate
    • Not Evaluated
    • 5.2.0 RC1
    • 5.2.0 Beta1
    • Quick: SceneGraph
    • None
    • latest qt5-stable, ubuntu 13.10 & win7
    • ccc0e75fb6838fe58b4b22abc87cbe684fb4623e

    Description

      A test case with a bunch of z-ordered rectangles. Drag the rectangle #1 behind the others and weird things start happening.

      import QtQuick 2.1
      import QtQuick.Window 2.1
      
      Window {
          width: 640
          height: 400
      
          Repeater {
              id: repeater
              anchors.fill: parent
              model: ["chocolate", "steelblue", "rosybrown", "seagreen", "mediumslateblue"]
      
              MouseArea {
                  id: mouseArea
      
                  z: repeater.count - index
                  drag.target: mouseArea
                  acceptedButtons: Qt.LeftButton | Qt.RightButton
                  onDoubleClicked: mouse.button == Qt.LeftButton ? ++z : --z
      
                  x: index * width / repeater.count
                  y: index * height / repeater.count
                  width: parent.width / repeater.count * 2
                  height: parent.height / repeater.count * 2
      
                  Rectangle {
                      anchors.fill: parent
                      opacity: 0.8
                      border.width: 1
                      color: modelData
      
                      Text {
                          text: mouseArea.z
                          anchors.margins: 10
                          anchors.right: parent.right
                          anchors.bottom: parent.bottom
                      }
                  }
              }
          }
      }
      

      Attachments

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

        Activity

          People

            sletta Gunnar Sletta
            jpnurmi J-P Nurmi
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes