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

HighlightedText color on Windows7 is invalid

    XMLWordPrintable

Details

    • Bug
    • Resolution: Out of scope
    • P4: Low
    • Some future release
    • 4.7.1
    • Widgets: Itemviews
    • None
    • Windows 7, 64 bit

    Description

      Hi.

      I am using custom delegate to paint items in QTreeView. I'm using QPalette::Text to draw normal text and QPaletter::HighlightedText to draw text on selected items (with standard selection background). Homever, on Windows7 HighlightedText returns invalid color (white instead of black on my particular instance).

      Here is code for selecting text color:
      http://gitorious.org/kadu/kadu/blobs/master/kadu-core/gui/widgets/buddies-list-view-item-painter.cpp#line424

      I've found some code in Qt source that looks like a hack that I think I need to copy to my delegate code:
      http://qt.gitorious.org/qt/qt/blobs/4.7/src/gui/styles/qwindowsvistastyle.cpp#line1502

      I think that this hack should be replaced with proper fix for QPalette or even moved to QPalette code so each delegate could use it.

      Attachments

        1. main.cpp
          1 kB
          Bartosz Brachaczek
        2. screenshot-1.png
          3 kB
          Attila
        3. screenshot-2.png
          8 kB
          Attila
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            Unassigned Unassigned
            vogel RafaƂ Malinowski
            Votes:
            1 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes