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.
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.
Set the text as rich text, not as plain text.
Qt Code:
widget->setText("<html><body>My long title</body></html>");To copy to clipboard, switch view to plain text mode
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.
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.
Bookmarks