ScriptAction QML Type
Define los scripts que se ejecutarán durante una animación. Más...
| Import Statement: | import QtQuick |
| Inherits: |
Propiedades
- script : script
- scriptName : string
Descripción detallada
ScriptAction se puede utilizar para ejecutar un script en un momento concreto de una animación.
SequentialAnimation {
NumberAnimation {
// ...
}
ScriptAction { script: doSomething(); }
NumberAnimation {
// ...
}
}Cuando se utiliza como parte de una transición, también se puede especificar un « StateChangeScript » concreto que se vaya a ejecutar mediante la propiedad « scriptName ».
State {
name: "state1"
StateChangeScript {
name: "myScript"
script: doStateStuff();
}
// ...
}
// ...
Transition {
to: "state1"
SequentialAnimation {
NumberAnimation { /* ... */ }
ScriptAction { scriptName: "myScript" }
NumberAnimation { /* ... */ }
}
}Véase también « StateChangeScript ».
Documentación de la propiedad
script : script
Esta propiedad contiene el script que se va a ejecutar.
scriptName : string
Esta propiedad contiene el nombre del StateChangeScript que se va a ejecutar.
Esta propiedad solo es válida cuando « ScriptAction » se utiliza como parte de una transición. Si se establecen tanto «script» como «scriptName», se utilizará «scriptName».
Nota: Cuando se utiliza «scriptName» en una transición reversible, el script solo se ejecutará cuando la transición se realice en sentido directo.
© 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.