View Full Version : KTitleWidget & word wrap
miraks
29th March 2009, 17:47
Hi,
I am using a KTitleWidget and sometimes the test displayed is too long for the screen.
So, how can I use word wrap on KTitleWidget (like QLabel::setWordWrap) ?
Thank you.
wysota
29th March 2009, 21:52
Set the text as rich text, not as plain text.
widget->setText("<html><body>My long title</body></html>");
miraks
29th March 2009, 22:11
Hi Wysota,
I tried your proposal but it doesn't work.
The long test is displayed on only one line, the widget is resized and the main panel is larger than the screen. :(
Do you have an other idea ?
Thank you.
wysota
29th March 2009, 23:24
Yes, use QLabel :) Seriously, if it doesn't work then it's a limitation of KTitleWidget and there is not much we can do about it. I suggest you use some other widget instead. KTitleWidget is a very simple widget, you can emulate it with QLabel and a timer and you'll get wordwrapping for free.
Powered by vBulletin® Version 4.2.5 Copyright © 2024 vBulletin Solutions Inc. All rights reserved.