ScriptAction QML Type
アニメーション中に実行されるスクリプトを定義します。詳細...
Import Statement: | import QtQuick |
Inherits: |
プロパティ
- script : script
- scriptName : string
詳しい説明
ScriptAction を使用すると、アニメーションの特定のポイントでスクリプトを実行できます。
SequentialAnimation { NumberAnimation { // ... } ScriptAction { script: doSomething(); } NumberAnimation { // ... } }
Transition の一部として使用する場合は、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 を可逆トランジションで使用する場合、スクリプトが実行されるのは、トランジションが順方向に実行されているときだけです。
© 2025 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.