OpacityAnimator vs NumberAnimation in a Transition yields different results
-
Using an OpacityAnimator in a Transition animates opacity changes only from 0 to 1 and not the other way around. Using a NumberAnimation instead, animates all changes correctly. Why is this?
Transition { to: "" SequentialAnimation { //OpacityAnimator {} NumberAnimation { properties: "opacity" }
As great as QML is, I seem to trip up on quirks all the time. Would be nice to be able to reason these things out rather than having to keep adding to a growing list of caveats and gotchas.
-
Because Animators are different thigs and do not work like Animations are. You can read detailed description here.
-
Yes I did see that link, but all it says is that Animators are run on the render thread. Other than that,
"The Animator types can be used just like any other Animation type."
It even explicitly says you can use Animators in a SequentialAnimation, and then that will get run on the render thread as well if possible.So it doesn't really explain the observed behavior.