Details
-
Type:
Suggestion
-
Status: Reported
-
Priority:
P4: Low
-
Resolution: Unresolved
-
Affects Version/s: 5.9.4, 5.10.1
-
Fix Version/s: None
-
Component/s: Core: Animation Framework
-
Labels:None
Description
It would be nice if a newcomer could find easily how to loop only once a gif image (or even better explicitly setting the count) .
Right now one have to use
frameChanged
andÂ
currentFrameNumber
in order to loop only once as shown in this thread.
connect(movie, &QMovie::frameChanged, this, [movie]() { if(movie->currentFrameNumber() == (movie->frameCount() - 1)) { movie->stop(); emit movie->finished(); //void QMovie::stop() doesn't emit it automatically } } );
Something like
void QMovie::setloopCount(int count)
could be very useful. If this isn't possible, at least please consider providing an example in the Documentation.
I am willing to write one if I am asked to.