Uploaded image for project: 'Qt Creator'
  1. Qt Creator
  2. QTCREATORBUG-11703

Visual element selector on QtC Quick Designer is not intuitive (Z-order problems)

XMLWordPrintable

      When using the designer and dragging a single element sometimes the clicked element is selected, sometimes not.

      Consider the following code:

      import QtQuick 2.2
      
      Rectangle {
          width: 360
          height: 360
          color: "transparent"
          Text {
              x: 158
              y: 163
              anchors.centerIn: parent
              text: "Hello World"
              anchors.verticalCenterOffset: -30
              anchors.horizontalCenterOffset: -13
          }
          MouseArea {
              anchors.fill: parent
              onClicked: {
                  Qt.quit();
              }
      
              TextEdit {
                  id: textEdit1
                  x: 160
                  y: 225
                  width: 80
                  height: 20
                  text: qsTr("Text Edit")
                  font.pixelSize: 12
              }
          }
      
          Text {
              x: 158
              y: 288
              text: "Hello World 2"
              anchors.verticalCenterOffset: 95
              anchors.horizontalCenterOffset: -9
              anchors.centerIn: parent
          }
      }
      

      Try the visual designer, try:

      1. Hover, drag "Hello World 2". Works.
      2. Hover, drag "Text Edit". Works.
      3. Hover "Hello World", doesn't hover.
      Drag "Hello World", doesn't work, it instead selects the MouseArea
      Try again, it will drag "Text Edit" along with the MouseArea. Really unintuitive.

      Expected Behavior: To drag the smallest pointed element, this will give precision to the drag-drop process as bigger elements can be dragged from other "empty" places. As an alternative have a better clue about what's to be dragged.

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

            thohartm Thomas Hartmann
            desert Ariel Molina R.
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes