Details
Description
LottieAnimation's start() and stop() don't work as expected.
This is 100% reproducible.
import QtQuick 2.15 import QtQuick.Window 2.15 import QtQuick.Controls 2.12 import Qt.labs.lottieqt 1.0 Window { width: 720 height: 720 visible: true title: qsTr("Hello World") Button { id: button1 text: "Play" onClicked: { // lottie.start() // NOT WORK // lottie.gotoAndPlay(lottie.startFrame) // NOT WORK lottie.gotoAndPlay(2) // (sometimes gotoAndPlay(1) works, but not always) } } Button { anchors.left: button1.right text: "Stop" onClicked: { // lottie.stop() // NOT WORK lottie.gotoAndStop(lottie.endFrame) } } LottieAnimation { id: lottie anchors.centerIn: parent source: "qrc:/test01.json" autoPlay: false onStatusChanged: { console.log("Status Changed:" + status) if (status === LottieAnimation.Ready) start() // WORK } } }
If we start() LottieAnimation in onStatusChanged(), it works okay.
But if we control manually (in the example, I've started and stopped in the button)
start() and stop() would not work.
(gotoAndPlay(startFrame) not works as well)