StateChangeScript QML Type
状態内でスクリプトを実行する方法を指定します。詳細...
| Import Statement: | import QtQuick |
プロパティ
詳細な説明
StateChangeScript は、状態に移行した際に実行されます。オプションで、ScriptAction を使用して、遷移のどの時点で StateChangeScript を実行するかを指定することができます。
State {
name: "state1"
StateChangeScript {
name: "myScript"
script: doStateStuff();
}
// ...
}
// ...
Transition {
to: "state1"
SequentialAnimation {
NumberAnimation { /* ... */ }
ScriptAction { scriptName: "myScript" }
NumberAnimation { /* ... */ }
}
}「ScriptAction」も参照してください 。
プロパティのドキュメント
name : string
このプロパティには、スクリプトの名前が格納されます。この名前は、ScriptAction が特定のスクリプトを指定する際に使用できます。
「ScriptAction::scriptName」も参照してください 。
script : script
このプロパティには、状態が「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.