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

Setting QTreeWidgetItem::foreground() back to default doesn't obey 'disabled' coloring

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • P3: Somewhat important
    • 5.15
    • 4.8.5, 5.2.0
    • Widgets: Itemviews
    • None
    • 96c27eb710a37780e79e09df2ebce1d5e4922c9d

    Description

      When setting QTreeWidgetItem font/foreground color with QTreeWidgetItem::foreground() and reverting it back to defaults with QTreeWidgetItem::foreground(columnId, QBrush()) the text color is always black even if it should be gray when the item is 'disabled'.

      Reverting back to default values doesn't seem to be a documented feature, but it works for 'enabled' items, and the same QBrush() trick works for QTreeWidgetItem::background().

      The attached example demonstrates the problem.

      Attachments

        Issue Links

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

          Activity

            People

              chehrlic Christian Ehrlicher
              qtcomsupport Qt Support
              Votes:
              1 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes