I have a QFrame with a vertical layout and 2 QLabels: one for an image (on top) and one with actual text (on bottom).
When I have the text QLabel word wrap, it takes up more space (as it should), but the parent QFrame does not expand/resize to accommodate the extra height, and instead, the image gets cut off.
Without word wrapping, everything looks perfect.
But once word wrapping kicks in..., you can see the QFrame remains the same height despite the text taking up more space, and you see the image has "less space" and gets cut off.
I want the QFrame to get taller when the text QLabel gets taller due to word wrapping.
The QFrame's vertical layout has layoutSizeConstraint=SetMinimumSize
and the sizePolicy
for everything is Preferred
(the default value from Qt Designer which I'm using to create the GUI).
The QLabel that has the image is being scaled down to be 100px wide.
I've tried messing around with all sorts of combinations of sizePolicy
changes with each object, but nothing I've tried has my desired outcome.