[Qt-qml] Applying common behaviour to a group of elements

alan.westbrook at nokia.com alan.westbrook at nokia.com
Wed Aug 4 20:24:59 CEST 2010


So it's a slideshow and each element is a page, and you have hundreds of pages?

Or do you have a few pages each with a bunch of elements?

Or do you have hundreds of elements which pop in and out on a single page?

Depending on what you mean, you could try putting your elements in a model and iterating over them setting opacity. You can also use a Behavior on opacity to enable fade in and out in the element definition.

Or you can fade each page in and out, all child elements will follow the opacity of it's parent page.

Alan

On Aug 4, 2010, at 11:14 AM, ext Alex wrote:

> 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?
> 
> Thanks,
> Alex
> _______________________________________________
> Qt-qml mailing list
> Qt-qml at trolltech.com
> http://lists.trolltech.com/mailman/listinfo/qt-qml





More information about the Qt-qml mailing list