diff options
author | Leena Miettinen <riitta-leena.miettinen@qt.io> | 2019-06-18 09:57:33 +0200 |
---|---|---|
committer | Leena Miettinen <riitta-leena.miettinen@qt.io> | 2019-06-18 10:24:42 +0000 |
commit | 4d073fb67d47567ad8934b60ab16fc29fc96bcac (patch) | |
tree | 6a08c4f716028983965432d6748be328a86cbe03 /doc | |
parent | 29668d633e7f2ac18782d19ea419881e27deae24 (diff) |
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>
Diffstat (limited to 'doc')
-rw-r--r-- | doc/examples/progressbar/main.cpp | 1 | ||||
-rw-r--r-- | doc/src/qtquick/qtquick-from-qmlproject-to-pro.qdoc | 5 |
2 files changed, 4 insertions, 2 deletions
diff --git a/doc/examples/progressbar/main.cpp b/doc/examples/progressbar/main.cpp index f8f4c584aa..d8275e35c2 100644 --- a/doc/examples/progressbar/main.cpp +++ b/doc/examples/progressbar/main.cpp @@ -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; diff --git a/doc/src/qtquick/qtquick-from-qmlproject-to-pro.qdoc b/doc/src/qtquick/qtquick-from-qmlproject-to-pro.qdoc index 174b6c3c93..9e1fe9919e 100644 --- a/doc/src/qtquick/qtquick-from-qmlproject-to-pro.qdoc +++ b/doc/src/qtquick/qtquick-from-qmlproject-to-pro.qdoc @@ -99,8 +99,9 @@ \quotefromfile progressbar/main.cpp \skipto QQuickView view; \printuntil view.show() - Where \c {qml\main.qml} is the path to and the name of the main QML - file in the Qt Quick UI project. + Where \c {qrc:/qml/imports} is the import path and + \c {qrc:qml/ProgressBar.ui.qml} is the path to and the + name of the main QML file in the Qt Quick UI project. \li Select \uicontrol Build > \uicontrol Run to build and run your project. \endlist |