Doc: Describe adding the import path

Also add the import path to the example main.cpp file.

Task-number: QDS-805
Change-Id: I990e5dc364d610a4cef5697b3355147f9e5fcde1
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
This commit is contained in:
Leena Miettinen
2019-06-18 09:57:33 +02:00
parent 29668d633e
commit 4d073fb67d
2 changed files with 4 additions and 2 deletions

View File

@@ -9,6 +9,7 @@ int main(int argc, char *argv[])
QGuiApplication app(argc, argv);
QQuickView view;
view.engine->addImportPath("qrc:/qml/imports");
view.setSource(QUrl("qrc:/qml/ProgressBar.ui.qml"));
if (!view.errors().isEmpty())
return -1;