PDA

View Full Version : How to wrap text in a label?



sasi
29th June 2009, 10:34
How do i wrap the text (in different lines) in a Qt label? I tried with enter, ALT+Enter, the escape sequences like \n, and html notations, but it doesn't work that way. Can someone help me in writing text in multiple lines?

aamer4yu
29th June 2009, 10:38
Did you try QLabel::setWordWrap(true) ???

sasi
29th June 2009, 12:39
Thanks for the reply. But is there a way to set it in the designer (UI form)?

SABROG
29th June 2009, 12:53
http://img37.imageshack.us/img37/9593/wordwrap.png

buddhog
21st October 2016, 20:37
You can do this in QtDesigner by selecting the label and going to the Property Editor, search for wordWrap and select it.

Camryn64
22nd October 2016, 05:14
fine.. new for me.. thanks for post