Op 23-9-2015 om 09:07 schreef Hamish Moffatt:
I want to be able to set the minimum size for a container widget
without ignoring the minimum sizes of the children. ie I want to
constrain the minimum size of the container, not override it. Is this
possible?
Here's what I mean. Let's say I have a QFrame with a QVBoxLayout
containing a couple of widgets, for example QRadioButton. I want this
QFrame to be a particular size, no smaller (it looks silly), big
enough to contain the child widgets, but no bigger. The size policies
on the frame and radio buttons are all minimum.
If I set the minimumSize property on the QFrame, I get the minimum
size I requested - but now the QFrame ignores the minimum sizes of the
children, so if the children require more room they are clipped. For
example if the user is using 150% font scaling in Windows...
Examples: no minimum size, with a minimum size set, with the minimum
size set but larger fonts...
If I were writing a custom widget then overriding
sizeHint()/minimumSizeHint() might help, but I want to do this in Qt
Designer/Creator using the standard container widgets. Is it possible?
I would say just adding a vertical spacer in your layout with a minimum
height should do the trick as well?
André
_______________________________________________
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest