Using the Qt SCXML Compiler (qscxmlc)
The qscxmlc tool reads an .scxml file and produces C++ source and header files, containing a class that implements a state machine as defined in SCXML.
Usage
The qscxml tool is invoked automatically if the QT variable in the project file includes scxml, and the .scxml file to use is specified using the STATECHARTS variable.
QT += scxml
STATECHARTS = MyStatemachine.scxml
QT利用qmake将scxml生成c头文件和源文件.h和.cpp。
应该也可以命令行执行,但是还没研究hh.