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

Memory Leak on repaint QTabBar with scrolling QToolButtons enabled

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Incomplete
    • Icon: Not Evaluated Not Evaluated
    • None
    • 4.7.4
    • Widgets: Style Sheets
    • None
    • Microsoft Windows XP, Qt Creator 2.3.0, Qt 4.7.4

      When using QTabBar component, with many tabs, to make scrolling QToolButtons visible.
      If we customize background color of these buttons with CSS like this :

      QTabBar QToolButton

      { background-color:#ANYCOLOR; }

      or
      QTabBar QToolButton

      { background:#ANYCOLOR; }

      ..it will cause memory leak, each times the QTabBar is repaint. That's why we can create a timer to repaint often, and see the memory growth.
      (For example, a blinking TabIcon, using setTabIcon will make the Tabs to repaint and cause the memory leak.)

      We can bypass this leak by using an image instead of color in CSS :

      QTabBar QToolButton

      { background:url(:/img/MY_BACKGROUND.png); }

      ..and the memory leak disappear.

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

            Unassigned Unassigned
            iexplore iexplore
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes