Forums

OverviewV-Play 2 Support (Qt 5)Button at the right top › Reply To: Button at the right top

OverviewV-Play 2 Support (Qt 5)Button at the right top › Reply To: Button at the right top
#12142

Alex
V-Play Team

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

Voted #1 for:

  • Easiest to learn
  • Most time saving
  • Best support

Develop Cross-Platform Apps and Games 50% Faster!

  • Voted the best supported, most time-saving and easiest to learn cross-platform development tool
  • Based on the Qt framework, with native performance and appearance on all platforms including iOS and Android
  • Offers a variety of plugins to monetize, analyze and engage users
FREE!
create apps
create games
cross platform
native performance
3rd party services
game network
multiplayer
level editor
easiest to learn
biggest time saving
best support