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. Stop animatedimage
Forum Updated to NodeBB v4.3 + New Features

Stop animatedimage

Scheduled Pinned Locked Moved Unsolved QML and Qt Quick
7 Posts 4 Posters 545 Views
  • 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.
  • D Offline
    D Offline
    Darq
    wrote on last edited by
    #1

    Hello.

    Is it possible to stop the gift animation (triggered by animatedimage) after e.g. two cycles (a cycle is displaying the animation from start to finish)? If so, what procedure to use?

    J.HilkJ 1 Reply Last reply
    0
    • D Darq

      Hello.

      Is it possible to stop the gift animation (triggered by animatedimage) after e.g. two cycles (a cycle is displaying the animation from start to finish)? If so, what procedure to use?

      J.HilkJ Online
      J.HilkJ Online
      J.Hilk
      Moderators
      wrote on last edited by
      #2

      @Darq set playing to false or paused to true


      Be aware of the Qt Code of Conduct, when posting : https://forum.qt.io/topic/113070/qt-code-of-conduct


      Q: What's that?
      A: It's blue light.
      Q: What does it do?
      A: It turns blue.

      D 1 Reply Last reply
      0
      • J.HilkJ J.Hilk

        @Darq set playing to false or paused to true

        D Offline
        D Offline
        Darq
        wrote on last edited by
        #3

        @J-Hilk Thank you for your response. I tested these two calls and when using them the animation does not start at all. My point is that the animation should be displayed in full once or twice, and with the playing and paused option, the animation does not start at all. Is there any other option to stop the animation from displaying once or several times?

        JonBJ 1 Reply Last reply
        0
        • D Darq

          @J-Hilk Thank you for your response. I tested these two calls and when using them the animation does not start at all. My point is that the animation should be displayed in full once or twice, and with the playing and paused option, the animation does not start at all. Is there any other option to stop the animation from displaying once or several times?

          JonBJ Offline
          JonBJ Offline
          JonB
          wrote on last edited by
          #4

          @Darq
          Setting playing to false or paused to true is not going to start an animation, nor can these alter the fact that you have started the animation before these calls. If you don't show the code you have tried which does not work nobody can say more.

          1 Reply Last reply
          0
          • D Offline
            D Offline
            Darq
            wrote on last edited by
            #5
            	AnimatedImage { 
            		id: home
            		width: 80
            		height: 48
            		source: "/gif/home.gif"
            				}
            
            jsulmJ 1 Reply Last reply
            0
            • D Darq
              	AnimatedImage { 
              		id: home
              		width: 80
              		height: 48
              		source: "/gif/home.gif"
              				}
              
              jsulmJ Offline
              jsulmJ Offline
              jsulm
              Lifetime Qt Champion
              wrote on last edited by
              #6

              @Darq Where in the code you posted do you start and stop the animation?!

              https://forum.qt.io/topic/113070/qt-code-of-conduct

              J.HilkJ 1 Reply Last reply
              0
              • jsulmJ jsulm

                @Darq Where in the code you posted do you start and stop the animation?!

                J.HilkJ Online
                J.HilkJ Online
                J.Hilk
                Moderators
                wrote on last edited by
                #7

                @jsulm probably only on creation.

                If I understand @Darq correctly this is, what he wants.

                AnimatedImage{
                        id:anImage
                        anchors.fill: parent
                        source: "qrc:/BusyIndicator.gif"
                        property int maxNumberOfFullCycles: 2
                        property int currentCycle: 0
                
                        onCurrentFrameChanged: {
                            console.log("CurrentFrame", currentFrame, frameCount)
                            if(currentFrame >= frameCount -1)
                                currentCycle++
                
                            if(currentCycle >= maxNumberOfFullCycles)
                                anImage.paused = true
                        }
                    }
                

                Be aware of the Qt Code of Conduct, when posting : https://forum.qt.io/topic/113070/qt-code-of-conduct


                Q: What's that?
                A: It's blue light.
                Q: What does it do?
                A: It turns blue.

                1 Reply Last reply
                0

                • Login

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