Hi,
Glad you already solved that on your own. Just for reference, here are some more possibilities:
1. Every visual QML item has some margin properties, so you can add that margin with:
Button {
anchors.top: parent.top
anchors.right: parent.right
anchors.topMargin: 10
anchors.rightMargin: 10
}
2. You can also wrap you button in a more generic component named Item, this way you don’t have to set the color of your Rectangle component and it saves a little bit of performance.
3. You can still use absolute positioning (calculating the x value of your button from the parent’s width and the button’s width), i however don’t recommend that one.
Best,
Alex