[Qt-interest] QListWidget increasingly slow

André Somers andre at familiesomers.nl
Wed Nov 11 08:09:19 CET 2009


Just wanted to point out other options using the item views you were using
to start with:

·         If your lines are all the same height, use setUniformRowHeights
(or something like that) to true

·         Buffer your updates, so you only update up to, say, 20 times per
second. Then do the updates in batches instead of one by one.

 

André

 

Van: qt-interest-bounces at trolltech.com
[mailto:qt-interest-bounces at trolltech.com] Namens Bob Hood
Verzonden: dinsdag 10 november 2009 20:18
Aan: qt-interest at trolltech.com
Onderwerp: Re: [Qt-interest] QListWidget increasingly slow

 

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> 

Then just set the viewport's scroll bar position to the bottom when you add
text. 


Thanks, Josiah!  I'll refactor and give that a try to see if it's any
improvement.



 

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/20091111/c92dfa87/attachment.html 


More information about the Qt-interest-old mailing list