Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-52164

Provide a signal to indicate that a loop is finished in AnimatedImage

    XMLWordPrintable

Details

    Description

      Hello,

      It would be great to enhance AnimatedImage (and therefore QMovie), emitting a signal when a loop of the GIF source is finished, in order to trigger an action at the end of an animation. At the moment, we must do as below to check for the end of a loop :

      AnimatedImage {
          // ...
          onFrameChanged: {
              // Is this the last frame?
              // Btw, this code is wrong since the last frame hasn't been played yet
              if (currentFrame === frameCount - 1) {
                  doSomething();
              }
          }
      }
      

      The associated issue is bad performances on mobile platforms due to the number of JS calls, because each frame will trigger this function.

      Cheers,
      Louis

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            qt.team.quick.subscriptions Qt Quick and Widgets Team
            amnell Louis du Verdier
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes