Uploaded image for project: 'Qt Solutions'
  1. Qt Solutions
  2. QTSOLBUG-157

QtTreePropertyBrowser population process duration increasing each time

    XMLWordPrintable

    Details

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

        Attachments

        1. image-2018-05-17-14-17-06-290.png
          641 kB
          Dimiter 'malkia' Stanev
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

            Assignee:
            andysh Andy Shaw
            Reporter:
            gjaegy Gregory Jaegy
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Dates

              Created:
              Updated:

                Gerrit Reviews

                There are no open Gerrit changes