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 punto específico de una animación.
SequentialAnimation { NumberAnimation { // ... } ScriptAction { script: doSomething(); } NumberAnimation { // ... } }
Cuando se utiliza como parte de una Transición, también puede dirigirse a un StateChangeScript específico para ejecutarse utilizando 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 propiedades
script : script
Esta propiedad contiene el script a ejecutar.
scriptName : string
Esta propiedad contiene el nombre del StateChangeScript a ejecutar.
Esta propiedad sólo es válida cuando se utiliza ScriptAction 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 sólo se ejecutará cuando la transición se esté ejecutando hacia delante.
© 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.