Auf dieser Seite

StateChangeScript QML Type

Legt fest, wie ein Skript in einem Zustand ausgeführt wird. Mehr...

Import Statement: import QtQuick

Eigenschaften

Ausführliche Beschreibung

Ein StateChangeScript wird beim Eintritt in einen Zustand ausgeführt. Optional können Sie mit „ ScriptAction “ den Zeitpunkt im Übergang festlegen, zu dem das StateChangeScript ausgeführt werden soll.

State {
    name: "state1"
    StateChangeScript {
        name: "myScript"
        script: doStateStuff();
    }
    // ...
}
// ...
Transition {
    to: "state1"
    SequentialAnimation {
        NumberAnimation { /* ... */ }
        ScriptAction { scriptName: "myScript" }
        NumberAnimation { /* ... */ }
    }
}

Siehe auch „ ScriptAction “.

Dokumentation zu den Eigenschaften

name : string

Diese Eigenschaft enthält den Namen des Skripts. Dieser Name kann von einem „ ScriptAction “ verwendet werden, um ein bestimmtes Skript anzusprechen.

Siehe auch „ ScriptAction::scriptName “.

script : script

Diese Eigenschaft enthält das Skript, das ausgeführt werden soll, wenn der Zustand „aktuell“ ist.

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