PDA

View Full Version : QLabel auto width?



DiamonDogX
13th April 2009, 19:10
If I have a label, how do I specify that I want the label width to be automatically adjusted based on the text I have set? In other words, I want all the text to be visible no matter how much text is there. Thanks.

Grimlock
13th April 2009, 23:05
You just need to use a layout.

janus
14th April 2009, 07:23
Hi,

If I do not have a layout I call hide() and show(). Then the label adjusts its width depending on the new text length.

spirit
14th April 2009, 07:25
try to call adjustSize for that label.