[Development] QStateMachine and SCXML?

Kevin Funk kevin.funk at kdab.com
Fri Jan 8 12:12:28 CET 2016

On Friday, January 08, 2016 09:14:25 AM Ch'Gans wrote:
> Just discovered this few days ago:
> https://github.com/KDAB/KDStateMachineEditor


unfortunately KDStateMachineEditor has nothing to do with Vikas' request.

KDStateMachineEditor can import/export SCXML from/to its internal state 
machine representation, that's true.  You can import an SCXML file, and you'd 
get the graphical representation of the state machine in the editor interface; 
or you'd export a currently edited state machine as SCXML.

Which it cannot do is *initializing* a QStateMachine based on a SCXML 
specification. Vikas was probably referring to scc:

We played around with that idea in the past, too, but abandoned it b/c the 
SCXML *format* is just too far away from the Qt world.

@Vikas: What you might want to do: Check out the new Declarative State Machine 
Framework in Qt 5.4 which KDAB and Ford Motor Company have developed in a 
joint effort to overcome the problems using SCXML as description format:

Instead of using XML, this uses QML to describe a state machine, with all the 
benefits you get by leveraging QML features such as property bindings, etc.


    DSM.StateMachine {
            id: stateMachine
            initialState: state
            running: true
            DSM.State {
                id: state
                DSM.TimeoutTransition {
                    targetState: finalState
                    timeout: 1000
            DSM.FinalState {
                id: finalState

Hope this helps,


> Hope this helps.
> Chris
> On 8 January 2016 at 05:35, Vikas Bhargava <vikascodestuff at gmail.com> wrote:
> > Hi,
> > Can someone point me to the latest on whether State Machine initialization
> > based on a scxml specification would be supported. The last discussion I
> > could find
> > on the topic is at least 5 years old. The current State Machine framework
> > has no support as far as I can see.
> > 
> > Regards,
> > Vikas
> > 
> > _______________________________________________
> > Development mailing list
> > Development at qt-project.org
> > http://lists.qt-project.org/mailman/listinfo/development
> _______________________________________________
> Development mailing list
> Development at qt-project.org
> http://lists.qt-project.org/mailman/listinfo/development

Kevin Funk | kevin.funk at kdab.com | Software Engineer
KDAB (Deutschland) GmbH&Co KG, a KDAB Group company
Tel. Germany +49-30-521325470, Sweden (HQ) +46-563-540090
KDAB - Qt Experts - Platform-independent software solutions
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 7021 bytes
Desc: not available
URL: <http://lists.qt-project.org/pipermail/development/attachments/20160108/f91e928a/attachment.bin>

More information about the Development mailing list