[Qt-interest] Slow QTreeWidget

RZ rz at razfazz.at
Wed Mar 25 07:55:48 CET 2009


> Try  to use setUpdatesEnabled, as in QT example:
> 
>  setUpdatesEnabled(false);
>  bigVisualChanges(); // loop with your addResultRow call
>  setUpdatesEnabled(true);
> 
> 
In my case I had a model and a view (maybe you could do that too) and 
the setUpdatesEnabled didn't help that much - so I added two more lines:

model->blockSignals(true);
setUpdatesEnabled(false);
bigVisualChanges(); // loop with your addResultRow call
setUpdatesEnabled(true);
model->blockSignals(false);

The effect was more than significant .....



More information about the Qt-interest-old mailing list