int main(int argc, char *argv[]) { QApplication application(argc, argv); CalcWidget window; window.show(); return application.exec(); }
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(); }