Details
-
Bug
-
Resolution: Unresolved
-
P4: Low
-
None
-
5.5.0 Alpha
-
Ubuntu 13.04
Description
In attached example, if "running = false", pause() or stop() is called in Component.onComplete:
{..}, animator keeps running.
import QtQuick 2.4 import QtQuick.Window 2.2 import QtQuick.Controls 1.2 Window { visible: true width: 300 height: 100 Text { id: label text: "abc" } XAnimator { id: anim loops: Animation.Infinite running: true target: label from: 0 to: 50 duration: 1000 onStopped: console.log("animator was stopped") } MouseArea { anchors.fill: parent onClicked: { console.log(">onClicked"); if (anim.paused) anim.resume(); else anim.pause(); // anim.running = !anim.running console.log("<onClicked"); } } Component.onCompleted: { console.log(">Component.onCompleted"); anim.pause(); // anim.running = false console.log("<Component.onCompleted"); } Text { anchors.bottom: parent.bottom text: "is running: " + anim.running + ", is paused: " + anim.paused } }