diff options
author | Damian Jansen <damian.jansen@nokia.com> | 2011-08-26 15:38:56 +1000 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2011-09-02 07:56:38 +0200 |
commit | 44dabd02d63ecdb776b6a102888af06cac5987c0 (patch) | |
tree | 0088cde4de22dafc5a53f009cba780abeb1ee6d4 /examples/declarative/snake/content/Cookie.qml | |
parent | 04f75faee3f7aedd10748a00d83ff87a97c223e6 (diff) |
Update more examples to QtQuick 2.0
Minehunt and abstractitemmodel examples use QSGview
Snake now using Particles 2.0
Minor examples and twitter have updated imports
Removed duplicate delegate example
Change-Id: I04f8f8aeb8ef34ab2a8678ccc1d6d594b9db166e
Reviewed-on: http://codereview.qt.nokia.com/3630
Reviewed-by: Bea Lam <bea.lam@nokia.com>
Diffstat (limited to 'examples/declarative/snake/content/Cookie.qml')
-rw-r--r-- | examples/declarative/snake/content/Cookie.qml | 24 |
1 files changed, 16 insertions, 8 deletions
diff --git a/examples/declarative/snake/content/Cookie.qml b/examples/declarative/snake/content/Cookie.qml index 29b56f9e88..e3b3bbf3f5 100644 --- a/examples/declarative/snake/content/Cookie.qml +++ b/examples/declarative/snake/content/Cookie.qml @@ -39,8 +39,8 @@ ** ****************************************************************************/ -import QtQuick 1.0 -import Qt.labs.particles 1.0 +import QtQuick 2.0 +import QtQuick.Particles 2.0 Item { id: root @@ -68,13 +68,21 @@ Item { } - Particles { id: particles + ParticleSystem { width:1; height:1; anchors.centerIn: parent; - emissionRate: 0; - lifeSpan: 700; lifeSpanDeviation: 600; - angle: 0; angleDeviation: 360; - velocity: 100; velocityDeviation:30; - source: "pics/yellowStar.png"; + ImageParticle { + particles: ["star"] + source: "pics/yellowStar.png" + } + Emitter { + id: particles + anchors.fill: parent + particle: "star" + emitRate: 50 + emitting: false + lifeSpan: 700 + acceleration: AngledDirection { angleVariation: 360; magnitude: 200 } + } } states: [ |