Details
-
Bug
-
Resolution: Incomplete
-
Not Evaluated
-
None
-
5.5.1, 5.6.0
-
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.