ScriptAction QML Type
アニメーションの実行中に実行するスクリプトを定義します。詳細...
| Import Statement: | import QtQuick |
| Inherits: |
プロパティ
- script : script
- scriptName : string
詳細な説明
ScriptAction を使用すると、アニメーションの特定のポイントでスクリプトを実行できます。
SequentialAnimation {
NumberAnimation {
// ...
}
ScriptAction { script: doSomething(); }
NumberAnimation {
// ...
}
}トランジションの一部として使用する場合、scriptName プロパティを使用して、実行する特定のStateChangeScript を指定することもできます。
State {
name: "state1"
StateChangeScript {
name: "myScript"
script: doStateStuff();
}
// ...
}
// ...
Transition {
to: "state1"
SequentialAnimation {
NumberAnimation { /* ... */ }
ScriptAction { scriptName: "myScript" }
NumberAnimation { /* ... */ }
}
}「StateChangeScript」も参照してください 。
プロパティのドキュメント
script : script
このプロパティには、実行するスクリプトが格納されています。
scriptName : string
このプロパティには、実行するStateChangeScript の名前が格納されます。
このプロパティは、ScriptAction が遷移の一部として使用される場合にのみ有効です。scriptとscriptNameの両方が設定されている場合は、scriptNameが使用されます。
注: 可逆遷移で `scriptName`を使用する場合 、スクリプトは遷移が順方向で実行される場合にのみ実行されます。
© 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.