Allowing a window to become smaller
-
wrote on 2 Jul 2015, 07:34 last edited by
I have a window with a status bar on bottom. The window uses a vertical layout (content on top, statusbar on bottom). The status bar itself uses a horizontal layout, with fixed widths for the single fields.
Now the window cannot be made any smaller than the status bar. The status bar layout seems to promote its total width as minimum width to the outer layout. In the end, the window has a pretty big minimum size.
How can I change such an arrangement so that I can keep using a horizontal layout for the status bar itself, but allow a part of it to be hidden if the window is made smaller?
-
Hi,
What about allowing the single fields to shrink when the windows gets under a specific size ? Or hide one or the other of these fields ?
-
wrote on 3 Jul 2015, 06:53 last edited by
Fields should have a fixed size, this is a design requirement.
Hiding fields sounds pretty complex to develop.Is there no solution where the status bar itself is a horizontal layout, but that layout doesn't influence the window size limits?
-
Just one thing, when you say status bar, do you mean QStatusBar ?
-
One way is to put these widgets into a QScrollArea and set the horizontal scroll bar policy of it to
Qt::ScrollBarAlwaysOff
. This way the "overflowing" content would just be cut off. -
wrote on 7 Jul 2015, 07:17 last edited by
@SGaist said:
Just one thing, when you say status bar, do you mean QStatusBar ?
Yes, at core it's a QStatusBar.
@Chris-Kawa said:
One way is to put these widgets into a QScrollArea and set the horizontal scroll bar policy of it to
Qt::ScrollBarAlwaysOff
. This way the "overflowing" content would just be cut off.Sounds like an idea worth to try. Thanks!
6/6