Permalink
Browse files

Set rootContext before mainQmlFile to make sure the context is there …

…when the QML file is loaded.
  • Loading branch information...
1 parent ef0f303 commit e01ecafbba248a1c8943f36769160849bc9c8ece Cornelius Hald committed Jan 6, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 main.cpp
View
@@ -9,9 +9,9 @@ Q_DECL_EXPORT int main(int argc, char *argv[])
ServerComm sc;
QmlApplicationViewer viewer;
+ viewer.rootContext()->setContextProperty("serverComm", &sc);
viewer.setOrientation(QmlApplicationViewer::ScreenOrientationAuto);
viewer.setMainQmlFile(QLatin1String("qml/CuteSoma/main.qml"));
- viewer.rootContext()->setContextProperty("serverComm", &sc);
viewer.showExpanded();
return app->exec();

0 comments on commit e01ecaf

Please sign in to comment.