blob: c91ad93626faa7c0ba4d3082da4f2e664d71a945 (
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
27
28
29
30
|
import QtQuick 2.0
Item {
id: wrapper
width: 400; height: 400
function start() { animation.start() }
function stop() { animation.stop() }
property alias alwaysRunToEnd: animation.alwaysRunToEnd
property int startedCount: 0
property int stoppedCount: 0
Rectangle {
id: greenRect
width: 50; height: 50
color: "green"
NumberAnimation on x {
id: animation
from: 0
to: 100
duration: 200
onStarted: ++startedCount
onStopped: ++stoppedCount
}
}
}
|