diff options
Diffstat (limited to 'tests/auto/quick/qquickanimations/data/signals.qml')
-rw-r--r-- | tests/auto/quick/qquickanimations/data/signals.qml | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/tests/auto/quick/qquickanimations/data/signals.qml b/tests/auto/quick/qquickanimations/data/signals.qml new file mode 100644 index 0000000000..c91ad93626 --- /dev/null +++ b/tests/auto/quick/qquickanimations/data/signals.qml @@ -0,0 +1,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 + } + } +} |