[Interest] SCXML Statemachine donedata event

Ulf Hermann ulf.hermann at qt.io
Mon Nov 28 16:04:39 CET 2016


> Connections|{|
> ||target|: stateMachine|
> |    onEventOccurred: {|
> |        console.|log|(event.name)|
> |    }|
> |}|

 From QML you should use the EventConnection QML type. About like this:

EventConnection {
     stateMachine: stateMachine
     events: ["done.state.*"] // or ["done.state.somespecificstate", "done.state.someotherstate", ...]
     onOccurred: console.log(event.name)
}

 From C++ you can do the following:

statemachine.connectToEvent("done.state", [](const QScxmlEvent &event) {
     // do something
});

regards,
Ulf



More information about the Interest mailing list