Anchoring element's centers to the top of another element/ Overlaying elements
Unsolved
QML and Qt Quick
-
Rectangle { id: rect1 y: 200 height: 100 width: 500 color: "pink" } Rectangle { anchors.horizontalCenter: rect1.horizontalCenter anchors.verticalCenter: rect1.top height: 100 width: 100 color: "purple" }
Or, if you meant:
Rectangle { anchors.horizontalCenter: rect1.horizontalCenter anchors.bottom: rect1.top height: 100 width: 100 color: "purple" }