-
Bug
-
Resolution: Unresolved
-
P3: Somewhat important
-
6.4.0
The error message can be generated with this code:
Rectangle {
id: markerRect
width: 40
height: 40
color: "red"
opacity: 0.5
border.width: 10
border.color: "black"
radius: 4
// Cross
Rectangle {
width: 1
height: markerRect.height - 2*(markerRect.border.width)
anchors.centerIn: parent
color: "black"
}
Rectangle {
width: markerRect.width - 2*(markerRect.border.width)
height: 1
anchors.centerIn: parent
color: "black"
}
// Marker number
Label {
color: "white"
anchors.left: markerRect.left
anchors.top: markerRect.top
anchors.leftMargin: markerRect.border.width
anchors.topMargin: markerRect.border.width
text: "Text"
}
}
Error: main.qml:193:54: Could not compile binding for topMargin: Member width of QQuickPen of QQuickRectangle::border with type QQuickPen can be shadowed
anchors.topMargin: markerRect.border.width
Maybe it's a missing "FINAL" in the property definition as described here: https://www.qt.io/blog/compiling-qml-to-c-avoiding-duck-typing?