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. Do stuff after behavior with animation is finished in qml
Qt 6.11 is out! See what's new in the release blog

Do stuff after behavior with animation is finished in qml

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

    Hi,
    I have behavior on a property in qml and i want to do a stuff after the animation is done (is finished).
    I have used Behaviour with states.
    @
    Behavior on height {
    SmoothedAnimation{
    duration: 250;
    }
    }@
    How can i do that?

    1 Reply Last reply
    0
    • sierdzioS Offline
      sierdzioS Offline
      sierdzio
      Moderators
      wrote on last edited by
      #2

      @
      Behavior on height {
      SmoothedAnimation{
      duration: 250;
      onRunningChanged: {
      if (!running) {
      // your code here
      }
      }
      }
      }
      @

      (Z(:^

      1 Reply Last reply
      0
      • J Offline
        J Offline
        Jagholin
        wrote on last edited by
        #3

        Why so much JS?
        @Behavior on height {
        SequentialAnimation {
        SmoothedAnimation { duration: 500 }
        ScriptAction {
        script: console.log("something changed")
        }
        }
        } @
        Also, take a look at PropertyAction type

        1 Reply Last reply
        0
        • sierdzioS Offline
          sierdzioS Offline
          sierdzio
          Moderators
          wrote on last edited by
          #4

          So much JS? Both your snippet and mine have exactly 1 line of JS code :P

          (Z(:^

          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