diff options
author | Oliver Eftevaag <oliver.eftevaag@qt.io> | 2023-03-23 17:12:52 +0100 |
---|---|---|
committer | Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> | 2023-04-25 17:39:09 +0000 |
commit | 33beb3ff2ae487cf86adfcb1903fb7e17524692b (patch) | |
tree | aa188f5f4e7c6f9d807a3a31ea486e6cff654305 /examples/quick/particles/system/startstop.qml | |
parent | ee35560dacedfb0264ccdf1c5d4863a6a791e8bb (diff) |
Particle system example: qmllint and qsTr()
User facing strings are being translated, and all qmllint warnings are
gone. JavaScript statments no longer end with semi-colon, and some
whitespace changes have been made.
Change-Id: I2a6792800ef3b8a0dc596632dcd3b7d76aa08fe3
Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
(cherry picked from commit b65c0ce1339ab44a8bb48e0556c042316f402e51)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Diffstat (limited to 'examples/quick/particles/system/startstop.qml')
-rw-r--r-- | examples/quick/particles/system/startstop.qml | 11 |
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; |