Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
import-file-selector.qdoc
Go to the documentation of this file.
1
// Copyright (C) 2026 The Qt Company Ltd.
2
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only
3
4
/*!
5
\page qmllint-warnings-and-errors-import-file-selector.html
6
\ingroup qmllint-warnings-and-errors
7
8
\title Import file selector
9
\brief [import-file-selector] Imports using file selectors.
10
11
\qmllintwarningcategory import-file-selector
12
13
This category is disabled by default due to current limitations in QML tooling towards
14
QML modules with file selectors.
15
16
\section1 Warnings occurred while importing
17
18
\section2 What happened?
19
The QML tooling found ambiguous types in an \l{Import Statements}{imported module}
20
due to \l{Using File Selectors with Qt Quick Controls}{file selector} usages in the
21
imported module. The QML runtime selects the appropriate file based on a runtime
22
configuration, while the QML tooling has no information on which file will be
23
selected, creating the ambiguity.
24
25
26
\section2 Why is that bad?
27
QML tooling can't use the import: the \l{Qt Quick Compiler}{compiler} can't compile
28
this file to C++ and \l{qmllint} as well as \l{\QMLLS} can't provide useful warnings
29
on that file.
30
31
\omit
32
// TODO: add example once there is a way to make tooling understand file selectors
33
\section2 Example
34
\qml
35
// Main.qml
36
import QtQuick
37
38
Item {
39
}
40
\endqml
41
To fix this warning, ...
42
43
\qml
44
import QtQuick
45
46
Item {
47
}
48
\endqml
49
50
\endomit
51
*/
qtdeclarative
src
qml
doc
src
qmllint
import-file-selector.qdoc
Generated on
for Qt by
1.16.1