In the realm of reusable elements, there exists a unique type with the property of Rectangle
:
property Item middleRegion: Rectangle {
color: "grey";
border.width: 1;
height: line.height;
parent: line
}
If a user decides to define their own middleRegion
, it triggers the function onMiddleRegionChanged()
:
onMiddleRegionChanged: {
middleRegion.parent = line
middleRegion.height = line.height
}
However, even when the value of line.height
is altered, the binding between line.height
and middleRegion.height
fails to update. Why does this code fail to properly bind the values?
An interesting point to note is that if the user chooses not to define middleRegion
, everything seems to work correctly.