FinalState QML Type

最終状態を提供します。詳細...

Import Statement: import QtQml.StateMachine 6.8
Inherits:

QAbstractState

詳細説明

最終状態は、StateMachine (の一部)がその作業を終了したことを伝えるために使用される。最終トップレベル状態に入ると、ステートマシンのfinished() シグナルが発せられる。一般に、最終サブステート(ステートの子)に入ると、親ステートのfinished() シグナルが出力される。FinalState はQt State Machine QML API の一部です

FinalStateを使用するには、FinalStateオブジェクトを作成し、他のStateからの遷移を追加します。

使用例

import QtQuick
import QtQml.StateMachine as DSM

Rectangle {
    DSM.StateMachine {
        id: stateMachine
        initialState: state
        running: true
        DSM.State {
            id: state
            DSM.TimeoutTransition {
                targetState: finalState
                timeout: 200
            }
        }
        DSM.FinalState {
            id: finalState
        }
        onFinished: console.log("state finished")
    }
}

StateMachine およびStateも参照して ください。

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