이 페이지에서

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.