StateChangeScript QML Type
Especifica cómo ejecutar un script en un estado. Más información...
| Import Statement: | import QtQuick |
Propiedades
Descripción detallada
Un StateChangeScript se ejecuta al entrar en un estado. Opcionalmente, puedes utilizar ScriptAction para especificar el momento 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 la propiedad
name : string
Esta propiedad contiene el nombre del script. Un ScriptAction puede utilizar este nombre para seleccionar un script concreto.
Véase también ScriptAction::scriptName.
script : script
Esta propiedad contiene el script que se ejecutará cuando el estado sea «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.