Reputation: 4648
I have a fixed size label on a QtDesigner form. The label is used to display images, let's assume it's used to display thumbnails of 100x100 px.
I can set the size of the label but when I put the label in some layout manager the labels get resized to take the whole space. Even if I do it through the Form > Layout in a Grid. The size of the labels is shrunk.
I believe this is some corner case as labels are not often used to do such things (although they are meant to be able to display images). Is there a workaround to avoid the size of the labels changing when placed in the layout?
Upvotes: 2
Views: 13275
Reputation: 1904
You can set horizontal and vertical size policies to Fixed or set the maximum height and width additionally. Either in code or in Designer.
Upvotes: 7