StateChangeScript QML Type
Specifica come eseguire uno script in uno stato. Maggiori informazioni...
| Import Statement: | import QtQuick |
Proprietà
Descrizione dettagliata
Uno StateChangeScript viene eseguito all'entrata in uno stato. È possibile, facoltativamente, utilizzare ScriptAction per specificare il punto della transizione in cui lo StateChangeScript deve essere eseguito.
State {
name: "state1"
StateChangeScript {
name: "myScript"
script: doStateStuff();
}
// ...
}
// ...
Transition {
to: "state1"
SequentialAnimation {
NumberAnimation { /* ... */ }
ScriptAction { scriptName: "myScript" }
NumberAnimation { /* ... */ }
}
}Vedi anche ScriptAction.
Documentazione delle proprietà
name : string
Questa proprietà contiene il nome dello script. Tale nome può essere utilizzato da un ScriptAction per individuare uno script specifico.
Vedi anche ScriptAction::scriptName.
script : script
Questa proprietà contiene lo script da eseguire quando lo stato è "current".
© 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.