diff options
author | Alan Alpert <alan.alpert@nokia.com> | 2011-09-01 15:27:05 +1000 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2011-09-07 09:26:15 +0200 |
commit | ca6d931bb7714de7293dab5d14a19f74dc98d103 (patch) | |
tree | 46b860a2dc0a352877420e7d58ab4324b2511242 /examples | |
parent | b04f4207d9070b29221eec8fb3206ba8510b2004 (diff) |
Animation-like API for ParticleSystem
Includes skipping rendering when paused.
Change-Id: I353ac415fb877917d46ba1832ad9cb5a84640b57
Reviewed-on: http://codereview.qt.nokia.com/4041
Reviewed-by: Martin Jones <martin.jones@nokia.com>
Diffstat (limited to 'examples')
-rw-r--r-- | examples/declarative/particles/trails/shimmer.qml | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/examples/declarative/particles/trails/shimmer.qml b/examples/declarative/particles/trails/shimmer.qml index 2bd4f6980f..d195a4477b 100644 --- a/examples/declarative/particles/trails/shimmer.qml +++ b/examples/declarative/particles/trails/shimmer.qml @@ -47,7 +47,13 @@ Rectangle{ color: "black" MouseArea{ anchors.fill: parent - onClicked: particles.running = !particles.running + acceptedButtons: Qt.LeftButton | Qt.RightButton + onClicked: { + if (mouse.button == Qt.LeftButton) + particles.running = !particles.running + else + particles.paused = !particles.paused; + } } ParticleSystem{ id: particles |