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