This warning category is spelled [import] by qmllint.
The module imported via import statement was not found.
This can be caused, for example, by
The application can't run because it can't find a module it relies on.
import QtQuicky // not ok: typo in module name Item { }
To fix this warning, correct the typo:
import QtQuick // ok: no typo in module name Item { }
Some tooling like QML Language Server or qmllint can't find user-defined modules when they are not built. If your project defines the QML Module you are trying to import, then the QML tooling will not find it until you build it.
Note: If building the module does not help when using QML Language Server, follow the instructions in QML Language Server setup instructions and make sure that you communicate the correct build folder to QML Language Server.
Please refer to the QML import path documentation and to the debugging module import documentation for more information about import paths.
Please refer to the QT_QML_GENERATE_QMLLS_INI documentation for more information on how to set that CMake variable.
If the previous sections did not help to find the imported module, it might be missing. This might be caused by a missing dependency. When using external libraries, verify that they are actually installed, and that their modules end up in an import path.
Some component was not found.
The application can't run because it can't instantiate the non-found component.
import QtQuick Item { Itemy {} // not ok: typo in name }
To fix this warning, correct the typo:
import QtQuick Item { Item {} // ok: no typo in name }
Item { // not ok: must be imported from QtQuick first }
To fix this warning, add the missing module import:
import QtQuick Item { // ok: was imported from QtQuick }
Some imported module has an invalid qualifier.
The module imported with this invalid qualifier can't be used.
import QtQuick as qq
qq.Item {
}
To fix this warning, make the import qualifier start with an upper case letter:
import QtQuick as Qq
Qq.Item {
}
An import statement is using an invalid import syntax.
The application can't run because it can't import a module it relies on.
import "¯\(ツ)/¯:/path/to/Module"
import QtQuick
Item {
}
To fix this warning, use URLs that have an allowed scheme:
import "qrc:/path/to/Module"
import QtQuick
Item {
}
Note: This example assumes that you are not using URL handlers.
See also Import Statements.
As part of the free Business evaluation, we offer a free welcome call for companies, to talk about your requirements, and how the Felgo SDK & Services can help you. Just sign up and schedule your call.
Sign up now to start your free Business evaluation: