Home · All Classes · All Functions · Overviews

QML AnimatedImage Element Reference

[Inherits Image]

Properties

Detailed Description

This item provides for playing animations stored as images containing a series of frames, such as GIF files. The full list of supported formats can be determined with QMovie::supportedFormats().

 Item {
     width: anim.width; height: anim.height+8
     AnimatedImage { id: anim; source: "pics/games-anim.gif" }
     Rectangle { color: "red"; width: 4; height: 8; y: anim.height
         x: (anim.width-width)*anim.currentFrame/(anim.frameCount-1)
     }
 }


Property Documentation

currentFrame : int
frameCount : int

currentFrame is the frame that is currently visible. Watching when this changes can allow other things to animate at the same time as the image. frameCount is the number of frames in the animation. For some animation formats, frameCount is unknown and set to zero.


paused : bool

This property holds whether the animated image is paused or not

Defaults to false, and can be set to true when you want to pause.


playing : bool

This property holds whether the animated image is playing or not

Defaults to true, so as to start playing immediately.



Copyright © 2010 Nokia Corporation and/or its subsidiary(-ies) Trademarks
Qt 4.7.0