[Qt-interest] QListWidget increasingly slow
Bob Hood
bhood2 at comcast.net
Wed Nov 11 00:59:20 CET 2009
Josiah Bryan wrote:
> Have you thought about using a QTextEdit and using html to colorize
> the lines and add icons? Use the QTextCursor interface to append html
> to the document.
>
> Line with icon html:
>
> <div style='background:red;color:white'><img src=':/data/icon.png'>
> Hello World!</div>
>
Yes, indeed. Using QTextEdit with its ensureCursorVisible() method
solves the backup problem. Text flows without trouble from start to end
(3,000+ lines) while the output is generated. Thanks for the
suggestion, Josi!
I have a minor issue, however. I'm trying to insertHtml() on the
QTextEdit, but all I'm getting is the text itself without any of the
formatting. For example, the HTML you provided (above) just shows up as
"Hello World!" in black on the white background. My icon is not being
displayed, and the color selections appear to be ignored. Is there some
kind of additional setup I need to perform on the QTextEdit to get it to
properly process HTML text?
Render me gone, |||
Bob ^(===)^
---------------------------------oOO--(_)--OOo---------------------------------
The brain is a wonderful organ; it starts working the moment you get up in
the morning and does not stop until you get to the office. - /Robert Frost/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20091110/ed9b9044/attachment.html
More information about the Qt-interest-old
mailing list