blob: 9d30c6b5de808f9d80d1d6852d71117d07d43521 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
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();
}
|