Important: Please read the Qt Code of Conduct -

animation in behavior, that signal not work

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

    onFinish is not work?


    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...

  • understood, It is not support

Log in to reply