[app] Set context properties prior to loading QML
This commit is contained in:
parent
f30d83bf39
commit
7042dbff79
1 changed files with 1 additions and 2 deletions
|
@ -166,14 +166,13 @@ void ZLibrary::run(ZLApplication* aApp)
|
||||||
HDEBUG("qml file" << qPrintable(qml));
|
HDEBUG("qml file" << qPrintable(qml));
|
||||||
|
|
||||||
QQuickView* view = SailfishApp::createView();
|
QQuickView* view = SailfishApp::createView();
|
||||||
view->setSource(QUrl::fromLocalFile(qml));
|
|
||||||
|
|
||||||
QQmlContext* root = view->rootContext();
|
QQmlContext* root = view->rootContext();
|
||||||
root->setContextProperty("PointsPerInch", BOOKS_PPI);
|
root->setContextProperty("PointsPerInch", BOOKS_PPI);
|
||||||
root->setContextProperty("MaximumHintCount", 1);
|
root->setContextProperty("MaximumHintCount", 1);
|
||||||
root->setContextProperty("DoubleClickInterval",
|
root->setContextProperty("DoubleClickInterval",
|
||||||
qApp->styleHints()->mouseDoubleClickInterval());
|
qApp->styleHints()->mouseDoubleClickInterval());
|
||||||
|
|
||||||
|
view->setSource(QUrl::fromLocalFile(qml));
|
||||||
view->show();
|
view->show();
|
||||||
HDEBUG("started");
|
HDEBUG("started");
|
||||||
qApp->exec();
|
qApp->exec();
|
||||||
|
|
Loading…
Reference in a new issue