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

Setting TableView Highlight color in Linux has no effect

    XMLWordPrintable

Details

    • Bug
    • Resolution: Incomplete
    • Not Evaluated
    • None
    • 5.5.1, 5.6.0
    • GUI: Look'n'Feel
    • None
    • Ubuntu 14.04

    Description

      I’m using Qt5.5.1 and Qt5.6. This problem occurs in both, so I think it’s a Qt5 problem generally. I have a QTableView. When I want to set the background color of highlighted table items in Windows, I can get the QTableView’s palette and call

      palette.setColor(QPalette::Highlight, QColor(someColor))

      and that sets the background color of a highlighted item, no problem.

      However, this does not work in Linux. (Specifically the different versions of Ubuntu that I’ve tried.) Instead the highlighted color is always an orange color that Ubuntu likes to use. Is there a way to fix this?

      I try to apply custom background color for selected rows. I set the custom stylesheet or I set palette to achieve this. But this has no effect.

      By the way, setting other types of colors, such as Palette::HighlightedText or QPalette::HighlightedText, works both with using stylesheet and palette approach. it’s a QPalette::Highlight issue only.

      Attachments

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

        Activity

          People

            bachewii Jens
            vasyl18 vasyl18
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes