[Interest] QLabel inconsistent sizing with word wrap

Tony Rietwyk tony at rightsoft.com.au
Fri Jul 18 03:59:15 CEST 2014


Hi Everybody. 

In my Qt 4.8.6 application I cannot understand why this QLabel widget's
sizing varies wildly depending on the text content - even for similar text!
The QLabel has only WordWrap switched on, and Alignment Top/Left.  All of
the widgets shown have size policy Preferred, except for the top level with
the black border that has horizontal and vertical both set to
MinimumExpanding.  I've checked the source records and both descriptions are
plain text without any line breaks, etc.  

There are lots of hits when googling, but few answers. 

Can anyone shed light on this?  Has the text layout code been improved in
v5?  

Regards, 

Tony
-------------- next part --------------
A non-text attachment was scrubbed...
Name: wide_text.png
Type: image/png
Size: 92820 bytes
Desc: not available
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20140718/ce7a220a/attachment.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: narrow_text.png
Type: image/png
Size: 108264 bytes
Desc: not available
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20140718/ce7a220a/attachment-0001.png>


More information about the Interest mailing list