aboutsummaryrefslogtreecommitdiffstats
path: root/examples/quick/mousearea/mousearea.qml
diff options
context:
space:
mode:
Diffstat (limited to 'examples/quick/mousearea/mousearea.qml')
-rw-r--r--examples/quick/mousearea/mousearea.qml6
1 files changed, 3 insertions, 3 deletions
diff --git a/examples/quick/mousearea/mousearea.qml b/examples/quick/mousearea/mousearea.qml
index 1540d85fdd..cecbc2cfc8 100644
--- a/examples/quick/mousearea/mousearea.qml
+++ b/examples/quick/mousearea/mousearea.qml
@@ -76,7 +76,7 @@ Rectangle {
onEntered: info.text = 'Entered'
onExited: info.text = 'Exited (pressed=' + pressed + ')'
- onPressed: {
+ onPressed: (mouse) => {
if (mouse.button == Qt.LeftButton)
buttonID = 'LeftButton'
else if (mouse.button == Qt.RightButton)
@@ -139,14 +139,14 @@ Rectangle {
+ ' (' + posInBox.x + ',' + posInBox.y + ' in window)'
}
- onReleased: {
+ onReleased: (mouse) => {
btn.text = 'Released (isClick=' + mouse.isClick + ' wasHeld=' + mouse.wasHeld + ')'
posInfo.text = ''
}
//! [clicks]
onPressAndHold: btn.text = 'Press and hold'
- onClicked: btn.text = 'Clicked (wasHeld=' + mouse.wasHeld + ')'
+ onClicked: (mouse) => { btn.text = 'Clicked (wasHeld=' + mouse.wasHeld + ')' }
onDoubleClicked: btn.text = 'Double clicked'
//! [clicks]
}