diff options
author | Noam Rosenthal <nrosenth@nokia.com> | 2009-06-08 12:27:03 -0700 |
---|---|---|
committer | Noam Rosenthal <nrosenth@nokia.com> | 2009-06-08 12:27:03 -0700 |
commit | d0441f605434a89b53735427e4e81182c65debbd (patch) | |
tree | b96d25dc89cdb523c007a22bc0deed3a5aa5dd56 /examples/calc/main.cpp | |
parent | a6553f68f17c28adca049857686496a69b4c1e7a (diff) |
scxml for 4.6
Diffstat (limited to 'examples/calc/main.cpp')
-rw-r--r-- | examples/calc/main.cpp | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/examples/calc/main.cpp b/examples/calc/main.cpp new file mode 100644 index 0000000..9d30c6b --- /dev/null +++ b/examples/calc/main.cpp @@ -0,0 +1,15 @@ + +#include <QtGui/QApplication> +#include "calc.h" +#include "qscriptedstatemachine.h" +int main(int argc, char *argv[]) +{ + QApplication a(argc, argv); + QtScriptedStateMachine *sm = QtScriptedStateMachine::load(":/calc.scxml"); + CalcWidget w; + sm->registerObject(&w,"",true); + QObject::connect (&w, SIGNAL(command(QString)), sm, SLOT(postNamedEvent(QString))); + w.show(); + sm->start(); + return a.exec(); +} |