summaryrefslogtreecommitdiffstats
path: root/examples/scxml/mediaplayer-widgets-dynamic
diff options
context:
space:
mode:
authorUlf Hermann <ulf.hermann@theqtcompany.com>2016-03-09 16:38:29 +0100
committerUlf Hermann <ulf.hermann@theqtcompany.com>2016-03-30 11:56:40 +0000
commita14b1e4c4787fa1e4a7d470444c248fd08817105 (patch)
tree53cd8d65c7aa8a983e1381a072a511c81ee028c5 /examples/scxml/mediaplayer-widgets-dynamic
parent703c6a6bee98c5d316de408867982b1684ad550b (diff)
Change examples to follow best practices
Adding QObjects as context properties to QML engines is not the best way to interoperate between QML and C++. This change exposes all state machines as proper QML components and instantiates them from QML. Also, it drops all the now unnecessary init() calls. Change-Id: Id44b4038542dd9469e02831c1bb54f096af1b6ff Reviewed-by: Erik Verbruggen <erik.verbruggen@theqtcompany.com>
Diffstat (limited to 'examples/scxml/mediaplayer-widgets-dynamic')
-rw-r--r--examples/scxml/mediaplayer-widgets-dynamic/mediaplayer-widgets-dynamic.cpp1
1 files changed, 0 insertions, 1 deletions
diff --git a/examples/scxml/mediaplayer-widgets-dynamic/mediaplayer-widgets-dynamic.cpp b/examples/scxml/mediaplayer-widgets-dynamic/mediaplayer-widgets-dynamic.cpp
index f36a62e..eba0fba 100644
--- a/examples/scxml/mediaplayer-widgets-dynamic/mediaplayer-widgets-dynamic.cpp
+++ b/examples/scxml/mediaplayer-widgets-dynamic/mediaplayer-widgets-dynamic.cpp
@@ -58,7 +58,6 @@ int main(int argc, char **argv)
QApplication app(argc, argv);
auto machine = QScxmlStateMachine::fromFile(QStringLiteral(":mediaplayer.scxml"));
- machine->init();
MainWindow mainWindow;
machine->setParent(&mainWindow);