
Originally Posted by
pospiech
Well, I was asking because it was not in the list of QWidget functions, but looking deeper it shows up in QLayout.
That's why I said to set a constraint on a layout.
This does the resizing. However also in width, and sets the size to fixed. That is much more than I wanted. I wanted it to be resized to minimum height without changes to the size constrain. If that is not possible I could live with size constrain.
You can set a different size constraint...
And yes I had looked into the documentation (QAssistent). But the docs very seldom provides solutions to problems (still they are a superb reference).
Sure they do, people just look in one place and if don't find the solution there, they assume it can't be nowhere else too. Using the search in Assistant (and not only the index) often helps but most people don't bother trying.
Now I know that there is a size constrain thing, but I still do not know how to resize to minimum height, without changing the size constrain.
You can always call
resize(width(), minimumSizeHint().height());
resize(width(), minimumSizeHint().height());
To copy to clipboard, switch view to plain text mode
but you have to do that manually.
Bookmarks