Quote Originally Posted by wysota View Post
And if I (as a user) want to reduce the height of the window on purpose and you constantly keep increasing it back? I really hate when programmers are trying to be smarter than users of their software...

If you have a scroll are then rely on it and the sanity of the user.
Fair enough. Maybe I'm just too focused on this issue because the initial size of the window is too small, and I should rather make the window larger initially and leave the user in full control of the window's dimensions after that...

Quote Originally Posted by wysota View Post
The proper way is to use layouts that will do it for you.

The thing is sizeHint() returns the right value all the time. If you add a widget to the scroll area inside the controlled widget, it doesn't cause a necessity to increase the window's size, it's just you as the programmer who sees this necessity. There is nothing stopping you from reimplementing sizeHint() for your widget and defining it differently. Actually you should provide your own layout class here but I really don't see how would you detect that you shouldn't be increasing the window size anymore and should allow the scroll area to do its job...
I see. Thanks for the heads-up.

Cheerz,
Franz