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

Non-enabled MouseArea consumes events it usually pass on

XMLWordPrintable

      Run the code below. Note that you can flick the blue rectangle by clicking down and dragging anywhere, outside it or outside it. Now click the rectangle to set "enabled = false", and note that flicking events started inside the rectangle has stopped working.

      import Qt 4.7
      
      Flickable {
          width: 800
          height: 800
      
          contentWidth: width+1   // make it flickable
          contentHeight: height+1
      
          Rectangle {
              width: 100
              height: 100
              color: enabled ? "blue" : "red"
              anchors.centerIn: parent
      
              MouseArea {
                  anchors.fill: parent
                  onClicked: parent.enabled = false
              }
          }
      }
      

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

            martjone Martin Jones (closed Nokia identity) (Inactive)
            mathiasm Mathias Malmqvist
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes