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:
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 :
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...)