Doc: Improve FAQ answer about QML imports

Even though CMake was mentioned, the text could be made more
general.

Task-number: QTCREATORBUG-26616
Change-Id: I6ff59e96559579c773d8ae1313f96800597e0ccc
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
This commit is contained in:
Leena Miettinen
2021-12-03 17:08:04 +01:00
parent 02d6dfdfec
commit 4a37833803

View File

@@ -1,6 +1,6 @@
/**************************************************************************** /****************************************************************************
** **
** Copyright (C) 2020 The Qt Company Ltd. ** Copyright (C) 2021 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/ ** Contact: https://www.qt.io/licensing/
** **
** This file is part of the Qt Creator documentation. ** This file is part of the Qt Creator documentation.
@@ -83,14 +83,15 @@
By default, \QC looks in the QML import path of Qt for QML modules. 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 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 modules are. When using qmake as the build system, specify the
your application. \c{QML_IMPORT_PATH} in the \c{.pro} file of your application. When
using CMake, add the \c set command to the CMakeLists.txt file.
This also enables code completion of QML code and removes error messages. This also enables code completion of QML code and removes error messages.
The following example illustrates how to specify the import path so that The following example illustrates how to specify the import path for qmake
it works when switching between build and run kits for different target projects so that it works when switching between build and run kits for
platforms: different target platforms:
\code \code
TEMPNAME = $${QMAKE_QMAKE} TEMPNAME = $${QMAKE_QMAKE}
@@ -99,8 +100,8 @@
message("my QML Import Path: "$$QML_IMPORT_PATH) message("my QML Import Path: "$$QML_IMPORT_PATH)
\endcode \endcode
For more information about how to set the import path when using CMake, see For more information about how to set the import path for CMake projects,
\l {Importing QML Modules}. see \l {Importing QML Modules}.
\b {What should I do when \QC complains about missing OpenGL support?} \b {What should I do when \QC complains about missing OpenGL support?}