Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-4657

QLabel on QStatusBar adds to its internal connection list whenever text is set and doesn't clear the list until the application exits

XMLWordPrintable

    • 08618c4d4e7b3d99ffa2b56ea03fa4e25de101bd

      When a QLabel is set on QStatusBar, the internal connection list is not cleared after clearing the text of the label. The list just grows each time the text is set on the label:-

      > I think I discovered what happens after setting the string:
      > After changes of the QStatusBar widgets the main window layout is
      > recalculated and this will also recalculate the tool bar layout.
      > Here the method
      > void QToolBarLayout::setUsePopupMenu(bool set)
      > is called with parameter set=false.
      > This calls
      > QObject::connect(extension, SIGNAL(clicked(bool)),
      > this, SLOT(setExpanded(bool)));
      > Hence, a new connection is added to the tool bar extension object with
      > every layout change.
      > The size of the connection list for the signal "clicked(bool)"
      > (QObjectPrivate::connectionLists[29]) grows more and more and correlates
      > with the number of QLabel::setText calls.

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

            goffart Olivier Goffart (closed Nokia identity) (Inactive)
            cattell Matthew Cattell (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes