[Qt-qml] Expected behavior of Transitions that animate properties not expected to change

Eduardo Fleury eduardo.fleury at openbossa.org
Mon Aug 9 22:27:46 CEST 2010


Hi there,

While working on Qt components I got into a situation I'd like to share with
you. I'm not sure yet this is a bug so I'd rather listen to what you think
before opening it.

Use case:
1) There is an on-off-switch component has three states "on", "off" and
"dragging".
2) State "on" sets the property "x" to 200, without restore entry values
3) State "off" sets the property "x" to 0, without restore entry values
4) State "dragging" does not set anything
5) There is a transition from "*" to "*" with a NumberAnimation {properties:
"x" }

Situation:
When I move from state "on" to "dragging", the value of X should NOT change,
right? Since there is no setting of X in "dragging" nor property value
restoration from "on" state.
This works OK.

But what about the "animation" inside the transition? Should it run? To
animate X to nowhere?
In my tests it seems to be running.
That means if I change the value of "x" by dragging my component, it will
flicker between the old and new position (because the animation is setting
the old X value from time to time).

Best regards,
-- 
Eduardo M. Fleury
OpenBossa - INdT
http://eduardofleury.com/
http://www.openbossa.org/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt.nokia.com/pipermail/qt-qml/attachments/20100809/996f7d07/attachment.html 


More information about the Qt-qml mailing list