|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The original report was that the customer did resize(main.sizeHint())
instead of the main.adjustSize(); Note that resize(main.sizeHint() still does
not work. However, calling main.adjustSize() should now do what the original
reporter wanted.
The problem was that the resize did not work, because at the point of the resize
the minimumHeight of main was still 22 (8+6+8), and we tried to resize it with
a new height of 10. The resize would bound the height up to 22, and the main
widget would then get a size of (200x22).
The reason why it still had a minimumHeight of 22 was that it was the
minimumSize of the previous layout configuration. Unfortunately the new
minimumSize of the widget hadn't been updated yet because there was a
LayoutRequest event in the queue that hadn't been processed yet. (This
LayoutRequest was triggered by that we called invalidate() from hide()).
Thus, processing the event queue immediately after the hide() could also have
been a workaround for this issue.
There is no really good fix for this issue (and it does not seem to be a
common problem) without introducing a risk for regressions.
Due to that we therefore decided to provide a fix in QWidget::adjustSize().
Reviewed-by: paul
|