diff options
Diffstat (limited to 'src/qml/doc/snippets/qml/statemachine/statemachine-button-history.qml')
-rw-r--r-- | src/qml/doc/snippets/qml/statemachine/statemachine-button-history.qml | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/qml/doc/snippets/qml/statemachine/statemachine-button-history.qml b/src/qml/doc/snippets/qml/statemachine/statemachine-button-history.qml index 10595a9398..8f628232c1 100644 --- a/src/qml/doc/snippets/qml/statemachine/statemachine-button-history.qml +++ b/src/qml/doc/snippets/qml/statemachine/statemachine-button-history.qml @@ -39,8 +39,8 @@ ****************************************************************************/ //! [document] -import QtQml.StateMachine 1.0 import QtQuick 2.0 +import QtQml.StateMachine 1.0 Rectangle { //![0] @@ -71,7 +71,7 @@ Rectangle { // start the state machine running: true - StateBase { + State { id: s1 // set the initial state initialState: s11 @@ -84,7 +84,7 @@ Rectangle { // do something when the state enters/exits onEntered: console.log("s1 entered") onExited: console.log("s1 exited") - StateBase { + State { id: s11 // create a transition from s1 to s2 when the button is clicked SignalTransition { @@ -96,7 +96,7 @@ Rectangle { onExited: console.log("s11 exited") } - StateBase { + State { id: s12 // create a transition from s2 to s3 when the button is clicked SignalTransition { @@ -107,7 +107,7 @@ Rectangle { onEntered: console.log("s12 entered") onExited: console.log("s12 exited") } - StateBase { + State { id: s13 // create a transition from s3 to s1 when the button is clicked SignalTransition { @@ -133,7 +133,7 @@ Rectangle { onEntered: console.log("s2 entered") onExited: console.log("s2 exited") } - StateBase { + State { id: s3 SignalTransition { targetState: s1h |