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

MouseArea / Button stop working after grabbing by DragHandler

    XMLWordPrintable

Details

    • Windows
    • 23df1603f514407d245a2740f32f589318ef654e (qt/qtdeclarative/5.15) ff6bd91f580fa5ddae2d02f32b9d83be4374a445 (qt/qtdeclarative/5.12)

    Description

      Example code:

      import QtQuick 2.13
      import QtQuick.Controls 2.13
      import QtQuick.Layouts 1.4
      
      ApplicationWindow {
          visible: true
          width: 640
          height: 480
          title: qsTr("Scroll")
      
          Rectangle {
              width: 200
              height: 200
              color: mouseArea.pressed ? "red" : "blue"
              opacity: 0.6
      
              MouseArea { //Similar problems occur if you change MouseArea to Button
                  id: mouseArea
      
                  anchors.fill: parent
              }
          }
          Rectangle {
              y: 100
              z: -1
              width: 200
              height: 200
              color: dragHandler.active ? "orange" : "green"
              opacity: 0.6
      
              DragHandler {
                  id: dragHandler
              }
          }
      }
      
      

      Steps to reproduce of the error:

      1. Press and hold at the place where two rectangles overlap (MouseArea goes in pressed state)
      2. Drag (DragHandler will be active, but MouseArea / Button stay in pressed state)
      3. Release the mouse button
      4. MouseArea doesn't respond to clicks anymore.

      Update: This only happens with a touch screen now, in 5.13.1 it was fixed as far as mouse input is concerned

      Attachments

        Issue Links

          Activity

            People

              srutledg Shawn Rutledge
              permotion88 Karol Polak
              Votes:
              1 Vote for this issue
              Watchers:
              11 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: