[Qt-interest] Slow QTreeWidget

Kenneth Beck nekkceb at comcast.net
Wed Mar 25 17:01:29 CET 2009


R. Reucher wrote:
> On Wed March 25 2009 14:14:15 Kenneth Beck wrote:
>> setUpdatesEnabled(false) did not do much, except to delay the visual
>> update until the end. I have a progress bar that steps with each row
>> add, and the time between steps gets progressively slower as rows get
>> added, again as if it is looping back to somehow update all the previous
>> data with each call to setText.
> Are you sorting the entries while you insert them?
> 
> I have QTreeWidget's with ~8000 entries (6 columns each) and they are filled 
> within less than a second (using Qt 4.5 that is, with 4.4 this was 
> perceptibly slower).
Well, I had this in my code, in the constructor for the page containing 
the TreeWidget:
   moduleRsltList->setSortingEnabled(false);

So I assume it was not sorting.

Do you use the setText like I did, or some other call?

I am busy converting to a TreeView......



More information about the Qt-interest-old mailing list