En esta página

StateChangeScript QML Type

Especifica cómo ejecutar un script en un estado. Más...

Import Statement: import QtQuick

Propiedades

Descripción detallada

Un StateChangeScript se ejecuta al entrar en un estado. Puede utilizar opcionalmente ScriptAction para especificar el punto de la transición en el que debe ejecutarse el StateChangeScript.

State {
    name: "state1"
    StateChangeScript {
        name: "myScript"
        script: doStateStuff();
    }
    // ...
}
// ...
Transition {
    to: "state1"
    SequentialAnimation {
        NumberAnimation { /* ... */ }
        ScriptAction { scriptName: "myScript" }
        NumberAnimation { /* ... */ }
    }
}

Véase también ScriptAction.

Documentación de propiedades

name : string

Esta propiedad contiene el nombre del script. Este nombre puede ser utilizado por ScriptAction para dirigirse a un script específico.

Véase también ScriptAction::scriptName.

script : script

Esta propiedad contiene el script a ejecutar cuando el estado es actual.

© 2026 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.