[Qt-qml] Applying common behaviour to a group of elements
michael.brasser at nokia.com
michael.brasser at nokia.com
Thu Aug 5 02:20:30 CEST 2010
On 05/08/2010, at 8:38 AM, ext Alex wrote:
> As you saw, I am using SequentialAnimation to sequence animations, but
> what if I want a non-animation in the sequence?
>
> For example, assume I've exposed a C++ "MediaPlayer" component to QML,
> which has a playFile(path) slot and playbackCompleted() signal.
>
> Is there a declarative approach for me to express the following?
>
> 1. animate fade-in for element A
> 2. play sound(S) and wait for completion
> 3. animate fade-in for element B
Another option that you could experiment with would be something like:
MediaPlayer {
id: mediaPlayer
onPlaybackCompleted: NumberAnimation {} //second fade
}
SequentialAnimation {
NumberAnimation {} //first fade
ScriptAction { script: mediaPlayer.play() }
}
Michael
More information about the Qt-qml
mailing list