Details
-
Bug
-
Resolution: Unresolved
-
Not Evaluated
-
None
-
Release 4
-
Windows 7
Description
Hi,
I use one of the Qt Property Browser component: QtTreePropertyBrowser.
The object being linked by this widget changes (when the users load a new file), therefore, sometime I recreate its content.
However, populating the QtTreePropertyBrowser lasts significantly longer each time, with the amount of items being constant. By longer I mean +1 second each time (release mode - first population lasting 1.5 second) ! So, really significant increase !!
I am using a QtVariantPropertyManager and a QtVariantEditorFactory object to create the properties.
Each time I want to display a new widget, I first call the following methods to clear the previous content:
m_pVariantManager->clear();
QtTreePropertyBrowser::clear();
Actually, the increasing slow down can be removed by commenting the setFirstColumnSpanned() call from qttreepropertybrowser.cpp, from the following method:
void QtTreePropertyBrowserPrivate::updateItem(QTreeWidgetItem *item)
line commented out :
//item->setFirstColumnSpanned(!property->hasValue());
I am not sure why, and what the side effects are, but the population process get much faster, and more important, is a constant time operation (0.45s constant time, while originaly 1.5s first population, 2.5s second population, then 3.5s...)