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. Issue with Animations

Issue with Animations

Scheduled Pinned Locked Moved QML and Qt Quick
4 Posts 3 Posters 1.1k 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.
  • W Offline
    W Offline
    Wuzi
    wrote on last edited by
    #1

    Hi,

    1. I don't understand the Behavior animation:

    @Behavior on width {
    NumberAnimation { duration: 1000 }
    }@

    Why this will be done so and not only the NumberAnimation:

    @NumberAnimation on width{ duration: 1000 }@ ?

    @ states: State {
    name: "rotated"
    PropertyChanges { target: rect; rotation: 180 }
    }

         transitions: Transition {
             RotationAnimation { duration: 1000; direction: RotationAnimation.Counterclockwise }
         }@
    

    Why here transitions is the animation to the PropertyChanges?
    "Qt Doc":http://qt-project.org/doc/qt-4.8/qml-rotationanimation.html

    1 Reply Last reply
    0
    • GianlucaG Offline
      GianlucaG Offline
      Gianluca
      wrote on last edited by
      #2

      Probably you didn't explain yourself completely, because the questions seems a bit silly.

      1. It's just syntax!
      2. because transitions animates the changes when passing from a state to another, and in the "rotated" state there is a PropertyChanges statements. That's it, again, it's just syntax.

      So, what do you really want to know ?

      1 Reply Last reply
      0
      • dheerendraD Online
        dheerendraD Online
        dheerendra
        Qt Champions 2022
        wrote on last edited by
        #3

        I request you to read the Qt Assistant for Animation. There are different ways in which animations can be triggered. Behavior and NumberAnimation are different types. They need to triggered separately. Behavior animation will trigger automatically whenever parameter(width) changes. Please read more about animations from Assistant. This will help you lot.

        Dheerendra
        @Community Service
        Certified Qt Specialist
        http://www.pthinks.com

        1 Reply Last reply
        0
        • W Offline
          W Offline
          Wuzi
          wrote on last edited by
          #4

          Thank you very much, that was my problem. I thought there are the same, but I ignored the trigger.

          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