IdentifiantMot de passe
Loading...
Mot de passe oublié ?Je m'inscris ! (gratuit)

TimeoutTransition QML Type

The TimeoutTransition type provides a transition based on a timer.

This type was introduced in Qt 5.4.

Article lu   fois.

L'auteur

Liens sociaux

Viadeo Twitter Facebook Share on Google+   

TimeoutTransition QML Type

  • Import Statement: import QtQml.StateMachine 6.4

  • Since:: Qt 5.4

  • Inherits:: QSignalTransition

  • Group: TimeoutTransition is part of statemachine-qmltypes

Detailed Description

Timer type can be combined with SignalTransition to enact more complex timeout based transitions.

TimeoutTransition is part of Qt State Machine QML API

Example Usage

 
Sélectionnez
import QtQuick
import QtQml.StateMachine as DSM

Rectangle {
    Button {
        anchors.fill: parent
        id: button
        text: "Finish state"
        enabled: !stateMachine.running
        onClicked: stateMachine.running = true
        DSM.StateMachine {
            id: stateMachine
            initialState: state
            running: true
            DSM.State {
                id: state
                DSM.TimeoutTransition {
                    targetState: finalState
                    timeout: 1000
                }
            }
            DSM.FinalState {
                id: finalState
            }
        }
    }
}

See Also

Property Documentation

 

timeout : int

The timeout interval in milliseconds.

Vous avez aimé ce tutoriel ? Alors partagez-le en cliquant sur les boutons suivants : Viadeo Twitter Facebook Share on Google+