How to determine the scale of a widget independent of its parent?

I want to be able to pull the tab to expand the widget. To achieve this, a button is placed on the edge of the parent widget, and when it is pressed, the scale changes from 0 to 1, creating the effect of being “pulled out.”
However, if the parent widget’s scale becomes 0, the button’s scale will also become 0 and it will no longer be possible to press it.
How can I make a button scale independent of its parent widget?

Many ways to achieve what you are asking for but as child hierarcy you can just use a ScaleBox as wrapper to your button

This is the first time I’ve learned how to use this box. Thank you very much.

1 Like