qt6-bb10/qtdeclarative/tests/auto/quick/qquickanimatedimage/data/currentframe.qml

15 lines
384 B
QML

import QtQuick 2.0
AnimatedImage {
property int currentFrameChangeCount: 0
property int frameChangeCount: 0
source: "stickman.gif"
paused: true
onCurrentFrameChanged: if (currentFrame > 0) ++currentFrameChangeCount;
onFrameChanged: if (currentFrame > 0) ++frameChangeCount;
function scriptedSetCurrentFrame(frame) {
currentFrame = frame;
}
}