aboutsummaryrefslogtreecommitdiffstats
path: root/examples/quick/particles/system/startstop.qml
diff options
context:
space:
mode:
Diffstat (limited to 'examples/quick/particles/system/startstop.qml')
-rw-r--r--examples/quick/particles/system/startstop.qml11
1 files changed, 6 insertions, 5 deletions
diff --git a/examples/quick/particles/system/startstop.qml b/examples/quick/particles/system/startstop.qml
index e275a4410b..e89c1f40f0 100644
--- a/examples/quick/particles/system/startstop.qml
+++ b/examples/quick/particles/system/startstop.qml
@@ -9,15 +9,16 @@ Rectangle {
height: 540
color: "black"
Text {
- text: "Left click to start/stop\nRight click to pause/unpause"
+ text: qsTr("Left click to start/stop\nRight click to pause/unpause")
color: "white"
font.pixelSize: 24
}
- MouseArea {
- anchors.fill: parent
+
+ TapHandler {
acceptedButtons: Qt.LeftButton | Qt.RightButton
- onClicked: (mouse) => {
- if (mouse.button == Qt.LeftButton)
+ onTapped: function (event, mouseButton)
+ {
+ if (mouseButton === Qt.LeftButton)
particles.running = !particles.running
else
particles.paused = !particles.paused;