My Widget grows according to the widget added to it's layout, but when the size of it's children change (smaller) the widget won't shrink. I've tried updating it's geometry when it's children change but to no avail.
Printable View
My Widget grows according to the widget added to it's layout, but when the size of it's children change (smaller) the widget won't shrink. I've tried updating it's geometry when it's children change but to no avail.
Resize the widget yourself or set a size constraint on the widget's layout.
Doesn't fix it.
Why would it fix it?
Isn't that a size constraint?Quote:
or set a size constraint on the widget's layout
There are more to pick from. Did you read in the docs what each of them does?
I have, but none of them size contraints seem to do anything diferent than set maximum/minimum hight and widht.:confused:
I guess I have to do it all by hand.
Do you know what the size constraint on the layout does?
Take a look at the Extension Example because it does exactly what you are asking for.
QLayout::SetFixedSize worked. Don't know why...