summaryrefslogtreecommitdiffstats
path: root/doc/src/snippets/statemachine/main3.cpp
blob: b04b85025fadcbbd8826371adc856ba009ac2a89 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21

#include <QtGui>

int main(int argv, char **args)
{
    QApplication app(argv, args);

//![0]
    QState *s1 = new QState(QState::ParallelStates);
    // s11 and s12 will be entered in parallel
    QState *s11 = new QState(s1);
    QState *s12 = new QState(s1);
//![0]

//![1]
  s1->addTransition(s1, SIGNAL(finished()), s2);
//![1]

    return app.exec();
}