[Development] Implementing QStateMachine using QtScxml module

Ulf Hermann ulf.hermann at qt.io
Wed Aug 21 10:56:01 CEST 2019

Hi Jarek (and everyone),

my initial assumption was that we can use the QStateMachine API only for 
constructing the state machine and doing introspection on it. In order 
to run it, you would have it generate a QScxmlStatemachine and _extract_ 
that, removing all the extra connections and glue. Such an approach 
should (theoretically) be faster than running a QStateMachine today. 
However, previous discussions indicated that there are some problems 
with this approach. Could you shed some light on that?

One thing I remember is that transitions in QStateMachine involve 
virtual method calls and that requires us to keep the original 
QStateMachine and its objects tied to the QScxmlStateMachine and its 
data model. If that is the only problem we could think about some 
alternative mechanism for defining transitions in QStateMachine.


More information about the Development mailing list