Hello,

I have 2 little questions, maybe silly ones:

I have a widget to which I attach a layout. Then I add lots of buttons & co to the layout.

First question:

How can I make the parent widget resize depending on the widgets I add or remove from the layout? I managed to make it grow, but removing widgets from the layout will not make the parent widget shrink. In the end I did it by resizing it myself, but I wonder if there isn't a smarter idea

Second question:

After adding the widgets on the layout, when will the geometry of the widget be updated so I can get the correct height by using widget.height()? After all kind of trials I managed to do that only after calling widget.setVisible(true). It is possible to get the height without that call?

Thank you