StateChangeScript QML Type
Especifica como executar um script em um estado. Mais...
| Import Statement: | import QtQuick |
Propriedades
Descrição detalhada
Um StateChangeScript é executado ao entrar em um estado. Opcionalmente, você pode usar ` ScriptAction ` para especificar o momento da transição em que o StateChangeScript deve ser executado.
State {
name: "state1"
StateChangeScript {
name: "myScript"
script: doStateStuff();
}
// ...
}
// ...
Transition {
to: "state1"
SequentialAnimation {
NumberAnimation { /* ... */ }
ScriptAction { scriptName: "myScript" }
NumberAnimation { /* ... */ }
}
}Veja também ` ScriptAction`.
Documentação da propriedade
name : string
Essa propriedade contém o nome do script. Esse nome pode ser usado por um ScriptAction para selecionar um script específico.
Veja também ScriptAction::scriptName.
script : script
Essa propriedade contém o script a ser executado quando o estado estiver atual.
© 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.