[Qt-qml] Simple and reversible ?

Attila Csipa qt at csipa.in.rs
Sun Feb 6 15:23:22 CET 2011


Just to hear a few thoughts (in addition to the irc ones)... What's the simple 
way of doing back-and-forth animations *without* including additional states, 
grouping them in sequences or killing performance by doing it in JS ? Example:

Image {
    id: glow
    source: "glow.png"
    SequentialAnimation {
        running: true
        loops: Animation.Infinite
        PropertyAnimation { target: glow; property: "opacity"; from: 0.0; to: 
1.0; duration: 1000;}
        PropertyAnimation { target: glow; property: "opacity"; from: 1.0; to: 
0.0; duration: 1000;}
     }
}

Ideally, I would expect to see a single statement for this kind of things, 
i.e.

Image {
    id: glow
    source: "glow.png"
    PropertyAnimation { property: "opacity"; from: 0.0; to: 1.0; duration: 
1000; reversing: true}
}

Of course, I'm not emotionally attached to a particular syntax (loops: 
Animation.InfiniteReversing ? Some magical easing.type = Easing.Yoyo ?), but 
still, it would certainly cut down a lot of unnecessary syntax verbosity and 
we apparently already seem to have an unexposed direction attribute on the C++ 
side...

Attila
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt.nokia.com/pipermail/qt-qml/attachments/20110206/0f92fefd/attachment-0001.html 


More information about the Qt-qml mailing list