このページでは

FinalState QML Type

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

Import Statement: import QtQml.StateMachine 6.12
Inherits:

QAbstractState

詳細な説明

最終状態は、StateMachine の(一部が)処理を完了したことを通知するために使用されます。トップレベルの最終状態に入ると、ステートマシンのfinished()シグナルが発行されます。一般に、最終サブ状態(Stateの子)に入ると、親状態のfinished()シグナルが発行されます。 FinalStateは、Qt State Machine のQML APIの一部です。

最終状態を使用するには、FinalStateオブジェクトを作成し、別の状態からそのオブジェクトへの遷移を追加します。

使用例

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も参照してください 。

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