PDA

View Full Version : QML: Applying common behaviour to a group of elements



alex_lord
4th August 2010, 03:54
Hi all,

I am building an application that has a PowerPoint-like informational component. To this end, I have a bunch of QML files that display content progressively, with items fading in one at a time.

In my current implementation, I give each object an id and set opacity to 0. I then have a SequentialAnimation block that uses a PropertyAnimation, individually referencing each id, to bring the opacity to 1.

This approach works but it is suboptimal (from a development point of view), considering that I will have hundreds of these QML files. Is there a better way to abstract/automate this behaviour?

Sorry if I'm being dense :-)

Alex