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/
**
** 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.
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.
modules are. When using qmake as the build system, specify the
\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.
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:
The following example illustrates how to specify the import path for qmake
projects so that it works when switching between build and run kits for
different target platforms:
\code
TEMPNAME = $${QMAKE_QMAKE}
@@ -99,8 +100,8 @@
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}.
For more information about how to set the import path for CMake projects,
see \l {Importing QML Modules}.
\b {What should I do when \QC complains about missing OpenGL support?}