[Qt-qml] State transition proposal: PropertyChangesLater
Thomas Perl
th.perl at gmail.com
Thu Feb 10 09:33:40 CET 2011
Hi Andre,
2011/2/7 Andre Somers <andre at familiesomers.nl>:
> What I do is something like this:
>
> //in definition of inner:
> opacity: state == "onscreen" || onscreenTransition.running ? 1 : 0
>
> //your transition:
> transitions: [
> Transition {
> AnchorAnimation {id:onscreenTransition}
> }
> ]
>
> I think that achieves what you want in a simpler way, and without having to
> introduce something like PropertyChangesLater.
Thanks, I tried that. Unfortunately, it seems as if the "running"
property of the AnchorAnimation object isn't changed when used in a
state transition. The way I test this is by implementing a
"onRunningChanged" slot on the object and using console.log() - I
don't get any output, and the trick you suggested with the opacity
doesn't work for that reason (otherwise it would be great and really
compact).
Is that a bug in QML (should an Animation inside a Transition have its
"running" property set to true while it's running due to a state
change?) or is this on purpose. If so, is there any other way to
achieve this "special case while in transition" mode?
Thanks,
Thomas
More information about the Qt-qml
mailing list