Skip to content

Commit d255c2a

Browse files
committed
examples: disable qmllint for CustomParentClass
It becomes confused about the QQuickPaintedItem parent that is not exposed through to .qmltypes
1 parent fbc99fe commit d255c2a

File tree

1 file changed

+15
-4
lines changed

1 file changed

+15
-4
lines changed

examples/qml_features/qml/pages/CustomParentClassPage.qml

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,21 +37,32 @@ Page {
3737
}
3838
}
3939

40-
4140
ColumnLayout {
4241
anchors.left: parent.left
4342
anchors.right: parent.right
4443
anchors.verticalCenter: parent.verticalCenter
4544

46-
// TODO: qmllint fails here possibly needs a dependency in the qmldir on QtQuick?
45+
// TODO: qmllint fails here as in the qmltypes CustomParentClass
46+
// is missing a prototype of QQuickPaintedItem it is not yet clear why
47+
// this is missed.
48+
//
49+
// qmltyperegistrar claims the following
50+
// QQuickPaintedItem is used as base type but cannot be found.
51+
//
52+
// The type QQuickPaintedItem is not embedded in the moc JSON,
53+
// does it come from elsewhere?
54+
//
55+
// qmllint disable incompatible-type Quick.attached-property-type
4756
CustomParentClass {
4857
id: customPainter
4958
color: "red"
5059
Layout.alignment: Qt.AlignHCenter
51-
height: 200
52-
width: 200
60+
Layout.preferredHeight: 200
61+
Layout.preferredWidth: 200
5362
}
5463

64+
// qmllint enable incompatible-type Quick.attached-property-type
65+
5566
Label {
5667
Layout.fillWidth: true
5768
horizontalAlignment: Text.AlignHCenter

0 commit comments

Comments
 (0)