Details
-
Suggestion
-
Resolution: Unresolved
-
P3: Somewhat important
-
6.6.3
-
None
Description
qmllint does not handle nesting of QtObjects it seems. It's useful to be able to declare a tree-like structure for things like color roles / settings:
For example Colors.qml registered as a QT_QML_SINGLETON_TYPE:
pragma Singleton import QtQuick import QtQml QtObject { id: root readonly property QtObject colors: QtObject { readonly property QtObject base: QtObject { readonly property color _100: "#FFFFFF" readonly property color _900: "#000000" } readonly property QtObject neutral: QtObject { readonly property color _100: "#DCDCDC" readonly property color _900: "#050505" } readonly property QtObject danger: QtObject { readonly property color _100: "#FCCACA" readonly property color _900: "#170202" } } }
And if you were to use a property like this:
Colors.colors.base._100
qmllint complains:
Member "base" not found on type "QObject" [missing-property]