Trolltech Home | Qt-interest Home | Recent Threads | All Threads | Author | Date
All threads index page 1

Qt-interest Archive, February 2007
Wrong word-wrap in QTextBrowser


Message 1 in thread

Hi,

QTextBrowser seems not to make the word-wrap correct in all cases on my system 
(Qt 4.2.2, Kubuntu 6.10, but the effect is them same on Windows): Some words 
aren't wrapped though they have to be. These words are so short that they 
would still fit into the QTextBrowser frame - but the vertical scroll bar is 
on top of them. I uploaded a screenshot to 
http://home.arcor.de/mathe.spiele/upload/qtextbrowser.png
Once I resize the window, the word-wrap is done correctly. It seems that if 
the scroll bar is hidden at the moment of inserting the text and it has to be 
shown for the new text, it is ignored during word-wrap.
As a workaround, I can call
resize(size()+QSize(1, 1));
in showEvent of the window containing the QTextBrowser.

I uploaded a small application demonstrating the problem to 
http://home.arcor.de/mathe.spiele/upload/textbrowser.tar.gz
Is this a bug in Qt or am I making something wrong?

With kind regards,
Ralf Jung

--
 [ signature omitted ]