summaryrefslogtreecommitdiffstats
path: root/doc/src/snippets/statemachine/main3.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'doc/src/snippets/statemachine/main3.cpp')
-rw-r--r--doc/src/snippets/statemachine/main3.cpp21
1 files changed, 21 insertions, 0 deletions
diff --git a/doc/src/snippets/statemachine/main3.cpp b/doc/src/snippets/statemachine/main3.cpp
new file mode 100644
index 0000000..b04b850
--- /dev/null
+++ b/doc/src/snippets/statemachine/main3.cpp
@@ -0,0 +1,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();
+}
+