-
Bug
-
Resolution: Fixed
-
P2: Important
-
5.3.0, 5.5.0, 5.5.1
MouseArea does not get canceled if it's disabled while in pressed state. This can be easily observed (from the logs) with the following QML. Just press and hold on the mouse area for over a second. After this you won't get onCanceled nor onReleased signals. Also "pressed" property stays true.
MouseArea {
width: 100; height: 100
onPressedChanged: {
console.log("mouseArea.pressed: " + pressed)
if (pressed) {
disableTimer.restart()
} else {
disableTimer.stop()
}
}
onPressed: console.log("mouseArea.onPressed")
onReleased: console.log("mouseArea.onReleased")
onCanceled: console.log("mouseArea.onCanceled")
onEntered: console.log("mouseArea.onEntered")
onExited: console.log("mouseArea.onExited")
onClicked: console.log("mouseArea.onClicked")
Timer {
id: disableTimer
interval: 1000
onTriggered: parent.enabled = false
}
}
- is duplicated by
-
QTBUG-103788 Disabling parent of MouseArea in onPressed gets stuck with mouse but not through touch
-
- Closed
-