Rectangle { color: "red" width: 300 height: 200 Rectangle { color: "black" width: 50 height: 50 anchors.centerIn: parent } Rectangle { color: "blue" width: 50 height: 50 anchors { top: parent.top left: parent.left } } Rectangle { color: "yellow" width: 50 height: 50 anchors { bottom: parent.bottom right: parent.right } } Rectangle { color: "green" width: 50 height: 50 anchors { horizontalCenter: parent.horizontalCenter bottom: parent.bottom } } }