Find the Best Demos and Examples

Check out this quick tour to find the best demos and examples for you, and to see how the Felgo SDK can help you to develop your next app or game!


OverviewFelgo 2 Support (Qt 5) › Button at the right top

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
  • #12140


    Hi, I want to add a pause/play button at the right top corner with margin 10 10. Now, I use a rectangle with a button inside it. Can I make that rectangle transparent or is there any other way to implement it?

    Help me please.



    I used color:”transparent” and it solved :3


    Felgo Team


    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.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.





    Thanks… I recoded with your first solution… It will be better…

Viewing 4 posts - 1 through 4 (of 4 total)

RSS feed for this thread

You must be logged in to reply to this topic.