diff options
author | Leena Miettinen <riitta-leena.miettinen@qt.io> | 2018-06-01 10:50:37 +0200 |
---|---|---|
committer | Leena Miettinen <riitta-leena.miettinen@qt.io> | 2018-06-01 13:08:37 +0000 |
commit | fff6065a691061a8a61db79327a272dd49184b09 (patch) | |
tree | 9abe5ea17441c921ba27ac35bc50453776856114 | |
parent | af1bd287a85b96d5d9b04c0c8d2d91d24f428e3f (diff) | |
download | qt-creator-fff6065a691061a8a61db79327a272dd49184b09.tar.gz |
Doc: Add a question to FAQ about QML imports not being found
This results in error messages and missing functionality.
Change-Id: I041ea8e61f3b4cd113964d2c5dfc609e6581c2f7
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
Reviewed-by: Marco Benelli <marco.benelli@qt.io>
-rw-r--r-- | doc/src/howto/qtcreator-faq.qdoc | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/doc/src/howto/qtcreator-faq.qdoc b/doc/src/howto/qtcreator-faq.qdoc index b6347c41fe..3bd14807ad 100644 --- a/doc/src/howto/qtcreator-faq.qdoc +++ b/doc/src/howto/qtcreator-faq.qdoc @@ -79,6 +79,29 @@ \section1 QML and Qt Quick Questions + \b {Why is there a red line below my QML import, even though I have the module?} + + By default, \QC looks in the QML import path of Qt for QML modules. + Sometimes, it does not get it right and you need to tell it where the + modules are by specifying the \c{QML_IMPORT_PATH} in the \c{.pro} file of + your application. + + This also enables code completion of QML code and removes error messages. + + The following example illustrates how to specify the import path so that + it works when switching between build and run kits for different target + platforms: + + \code + TEMPNAME = $${QMAKE_QMAKE} + MY_QTPATH = $$dirname(TEMPNAME) + QML_IMPORT_PATH += $$MY_QTPATH/../qml + message("my QML Import Path: "$$QML_IMPORT_PATH) + \endcode + + For more information about how to set the import path when using CMake, see + \l {Importing QML Modules}. + \b {What should I do when \QC complains about missing OpenGL support?} Some parts of \QC, such as \QMLD and QML Profiler, use Qt Quick 2, which |