Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. Gif animate once
Forum Updated to NodeBB v4.3 + New Features

Gif animate once

Scheduled Pinned Locked Moved Solved QML and Qt Quick
2 Posts 2 Posters 1.0k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    MartinD
    wrote on last edited by
    #1

    Hi,
    how to animate one loop of gif image? I want the gif to be invisible, then on some event it will appear on the screen, animates till the end and then the gif will disappear from the screen.

    Thanks

    1 Reply Last reply
    0
    • p3c0P Offline
      p3c0P Offline
      p3c0
      Moderators
      wrote on last edited by
      #2

      @MartinD In AnimatedImage you can use onFrameChanged handler where in you can check current frame number and total number of frames in the gif and then stop the play when it matches. Something like:

      AnimatedImage {
        source: "animatedimage.gif"
        onFrameChanged: if(currentFrame==frameCount-1) playing = false
      }
      

      157

      1 Reply Last reply
      3

      • Login

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved