Qt 4.8
Particles Class Reference

The Particles object generates and moves particles. More...

Inheritance diagram for Particles:
Item

Detailed Description

The Particles object generates and moves particles.

Since
4.7
Particles are available in the <b>Qt.labs.particles 1.0</b> module.
\e {Elements in the Qt.labs module are not guaranteed to remain compatible
in future versions.}

This element provides preliminary support for particles in QML,
and may be heavily changed or removed in later versions.

The particles created by this object cannot be dealt with
directly, they can only be controlled through the parameters of
the Particles object. The particles are all the same pixmap,
specified by the user.

The particles are painted relative to the parent of the Particles
object.  Moving the Particles object will not move the particles
already emitted.

The below example creates two differently behaving particle
sources.  The top one has particles falling from the top like
snow, the lower one has particles expelled up like a fountain.
import QtQuick 1.0
import Qt.labs.particles 1.0
Rectangle {
width: 240
height: 320
color: "black"
y: 0
width: parent.width
height: 30
source: "star.png"
lifeSpan: 5000
count: 50
angle: 70
angleDeviation: 36
velocity: 30
velocityDeviation: 10
xvariance: 30
pace: 100
}
}
y: 300
x: 120
width: 1
height: 1
source: "star.png"
lifeSpan: 5000
count: 200
angle: 270
angleDeviation: 45
velocity: 50
velocityDeviation: 30
yattractor: 1000
xattractor: 0
acceleration: 25
}
}
}
particles.gif

The documentation for this class was generated from the following file: