aboutsummaryrefslogtreecommitdiffstats
path: root/examples/declarative/particles/allsmiles/plain.qml
blob: 890a5782d13fd1ebfe171c3302b82e20b34d4d4e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
import QtQuick 2.0
import QtQuick.Particles 2.0

Rectangle{
    color: "goldenrod"
    width: 2000
    height: 2000
    ParticleSystem{id: sys}
    ImageParticle{
        id: up
        system: sys
        source: "content/singlesmile.png"
    }
    Emitter{
        anchors.centerIn: parent
        system: sys
        emitRate: 1000
        size: 20
        lifeSpan: 10000
        speed: AngledDirection{angleVariation: 360; magnitudeVariation: 100;}
    }
    MouseArea{
        anchors.fill: parent
        onClicked: up.autoRotation = !up.autoRotation
    }
}