Details
-
Bug
-
Resolution: Fixed
-
P2: Important
-
Qt for MCUs 1.9
-
97d8a15e9ecad9358533a01e361af690c27410ca, a66143331e73e382cc357917fa27db9523d025da
Description
In the doc https://doc.qt.io/QtForMCUs/qml-qtquick-animation.html#stopped-signal it says Animation.onStopped won't be triggered in a Transition, but I tried it on the Windows side, it will trigger. is this a doc bug? because I think triggered is expected.
> It is only triggered for top-level, standalone animations. It will not be triggered for animations in a Behavior or Transition, or animations that are part of an animation group.
import QtQuick 2.0 Rectangle { width: 480 height: 272 state: "Init" Text { id: sampleText anchors.centerIn: parent color: "salmon" text: "Hello World!" font.pixelSize: 14 scale: 1 opacity: 1 } states: [ State { name: "Init" PropertyChanges { target: sampleText opacity: 0 scale: 1 } }, State { name: "On" PropertyChanges { target: sampleText opacity: 1 scale: 2 } } ] transitions: [ Transition { from: "Init" to: "On" ParallelAnimation { NumberAnimation { property: "scale" duration: 3000 onStopped: { console.log("scale NumberAnimation stopped") } } NumberAnimation { property: "opacity" duration: 3000 onStopped: { console.log("opacity NumberAnimation stopped") } } onStarted: console.log("ParallelAnimation started") onStopped: { console.log("ParallelAnimation stopped") sampleText.text = "ParallelAnimation stopped" } } } ] Component.onCompleted: { state = "On" } }