Inherits Image
The AnimatedImage element 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().
import Qt 4.7 Rectangle { width: animation.width; height: animation.height + 8 AnimatedImage { id: animation; source: "animation.gif" } Rectangle { property int frames: animation.frameCount width: 4; height: 8 x: (animation.width - width) * animation.currentFrame / frames y: animation.height color: "red" } } |
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.
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.
Defaults to true, so as to start playing immediately.