This warning category is spelled [uncreatable-type] by qmllint.
You used a QML object from a lower-case namespace.
The QML language forbids lower-case namespaces.
import QtQuick as quick
quick.Item { ... }To fix the warning, rename the namespace to start with a capital letter:
import QtQuick as Quick
Quick.Item { ... }You tried to instantiate a QML object from a singleton type.
The QML language forbids instantiations of singletons.
import QtQuick
Item {
Qt { // note: Qt is a singleton type
id: qt
}
property string someProperty: qt.uiLanguage
}To fix the warning, use the singleton directly without instantiating it:
import QtQuick
Item {
property string someProperty: Qt.uiLanguage
}You tried to instantiate a QML object from an uncreatable type.
Uncreatable types are specifically marked to forbid instantiations. You might be misusing a type that should only be used as an attached type or as an interface.
import QtQuick
Item {
Keys {
onPressed: function (key) { ... }
}
}To fix the warning, use the Keys attached type instead of instantiating it:
import QtQuick
Item {
Keys.onPressed: function (key) { ... }
}import QtQuick
Item {
property PointerHandler myHandler: PointerHandler {}
}To fix the warning, use a more specific derived type like TapHandler:
import QtQuick
Item {
property PointerHandler myHandler: TapHandler {}
}
© The Qt Company Ltd
Licensed under the GNU Free Documentation License, Version 1.3.
https://doc.qt.io/qt-6.9/qmllint-warnings-and-errors-uncreatable-type.html