Qt Animation Framework reloaded

We released the first version of the animation framework quite some time ago and I guess lots of you have been wondering what we were doing. Well we've spent that time improving the API and make it work seamlessly.

So now we're proud to present you the Qt Animation Framework version 2.

What's new:
* we removed the QtState and QtTransition we had previously and replaced them with the newer and much more powerful State Machine Framework Kent blogged about a few days ago.
* the animation groups allows you to run animations in sequence or in parallel. They now are 2 distinct subclasses (QtParallelAnimationGroup and QtSequentialAnimationGroup). This allows for more specific API to each of the class.
* the animations were previously all done through QtAnimation and the support for QGraphicsItem was, let's be honest, hacked into it. Now we have added QtPropertyAnimation that adds support for QObject's property feature. We killed the explicit support for QGraphicsItem. We initially had another subclass of QtAnimation that would animate QGraphicsItem but that ended not helping much because the default QGraphicsItem can't do much (only position). If you feel like to you can still subclass QtAnimation to add support for your own types.

For animations the first-class citizen is now QtPropertyAnimation. It can handle variants and has support for easing curve, interpolation and key frames. We know that the main concern people usually have when it come to using intensively Qt's property system is that it uses QVariant which is slow. We did quite some profiling and performance is also much improved in that direction since the last version of this framework. When you want to animate "something", the only thing you need now is to add a property and then use a QtPropertyAnimation on it.

On the demo side we still have our little demos including the nice sub-attaq. API-wise the new stuff is hidden behind the scene and you'll have to have a look at the code or implement your own little demos to see the changes.

Hmmm OK we know that's not good enough!
So we know you're a big fan of stick men so here's a little video and you can see him do some actions. This demo is called stickman and is also provided with this solution (press D, C or J to change the current "action").

Here you can enjoy it before he dies ;-).

To download the solution you can go here. Don't forget to give us feedback. The new target for the framework is to be included into Qt 4.6.

Blog Topics: