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. animation in behavior, that signal not work
Forum Updated to NodeBB v4.3 + New Features

animation in behavior, that signal not work

Scheduled Pinned Locked Moved Unsolved QML and Qt Quick
3 Posts 2 Posters 566 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.
  • C Offline
    C Offline
    Cheng shi hua
    wrote on last edited by
    #1

    Behavior on x {
    ParallelAnimation {
    NumberAnimation {
    duration: dura
    }
    ScriptAction {
    script: { root.xFinish = false }
    }
    onFinish: { console.log("ok") }
    }
    }

    onFinish is not work?

    1 Reply Last reply
    0
    • 6thC6 Offline
      6thC6 Offline
      6thC
      wrote on last edited by
      #2

      https://doc.qt.io/qt-5/qml-qtquick-animation.html#finished-signal

      Probably would be onFinished() not onFinish... regardless, reading documentation above :
      "It is not emitted when running is set to false, nor for animations whose loops property is set to Animation.Infinite.

      In addition, it is only emitted for top-level, standalone animations. It will not be emitted for animations in a Behavior or Transition, or animations that are part of an animation group."

      For this simple example, could you not have a sequential with 2 scripts? One to set the flag to false, start the numberanimation and another script to log finish? It wouldn't rely on finished at all.

      Anyhow, hopefully that keeps you moving...

      1 Reply Last reply
      2
      • C Offline
        C Offline
        Cheng shi hua
        wrote on last edited by
        #3

        understood, It is not support

        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