Commit 3c5f8fc8 authored by Michael Winkelmann's avatar Michael Winkelmann
Browse files

Fix show-qml option

parent 2f4d68e9
...@@ -46,7 +46,8 @@ int main(int ac, char *av[]) { ...@@ -46,7 +46,8 @@ int main(int ac, char *av[]) {
} }
auto *view = new QQuickView; auto *view = new QQuickView;
view->show(); if (showQml)
view->show();
view->create(); view->create();
view->engine()->addImportPath("."); view->engine()->addImportPath(".");
...@@ -57,8 +58,6 @@ int main(int ac, char *av[]) { ...@@ -57,8 +58,6 @@ int main(int ac, char *av[]) {
view->setSource(QUrl::fromLocalFile(inputQml)); view->setSource(QUrl::fromLocalFile(inputQml));
view->setGeometry(0,0, view->rootObject()->width(), view->rootObject()->height()); view->setGeometry(0,0, view->rootObject()->width(), view->rootObject()->height());
if (showQml)
view->show();
QTimer::singleShot(delay,[=]() { QTimer::singleShot(delay,[=]() {
QmlPrinter printer; QmlPrinter printer;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment