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
\ingroup qmllint-warnings-and-errors
6
7
\title Import file selector
8
\brief [import-file-selector] Imports using file selectors.
9
10
\qmllintwarningcategory import-file-selector
11
12
This category is disabled by default due to current limitations in QML tooling towards
13
QML modules with file selectors.
14
15
\section1 Warnings occurred while importing
16
17
\section2 What happened?
18
The QML tooling found ambiguous types in an \l{Import Statements}{imported module}
19
due to \l{Using File Selectors with Qt Quick Controls}{file selector} usages in the
20
imported module. The QML runtime selects the appropriate file based on a runtime
21
configuration, while the QML tooling has no information on which file will be
22
selected, creating the ambiguity.
23
24
25
\section2 Why is that bad?
26
QML tooling can't use the import: the \l{Qt Quick Compiler}{compiler} can't compile
27
this file to C++ and \l{qmllint} as well as \l{\QMLLS} can't provide useful warnings
28
on that file.
29
30
\omit
31
// TODO: add example once there is a way to make tooling understand file selectors
32
\section2 Example
33
\qml
34
// Main.qml
35
import QtQuick
36
37
Item {
38
}
39
\endqml
40
To fix this warning, ...
41
42
\qml
43
import QtQuick
44
45
Item {
46
}
47
\endqml
48
49
\endomit
50
*/
qtdeclarative
src
qml
doc
src
qmllint
import-file-selector.qdoc
Generated on
for Qt by
1.16.1