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

이 속성에는 상태가 현재일 때 실행할 스크립트가 저장됩니다.


© 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.