guid/assets/rectangle_with_dynamic_anch...

44 lines
760 B
Plaintext
Raw Normal View History

2020-12-03 02:43:09 +01:00
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
}
}
}