I have a Qt application that uses a QTableView and a QListView. In both witdgets I display some icons.
The problem is that when the user selects one of the entries Qt alpha blends the selection over the icons making the icons appear with less contrast and slightly different colors.
I want Qt to draw the selection first and then draw the icons on top so they look the same no matter if they are selected or not. How can I do that?
Update:
This is what my problem looks like:
It is easier to spot with a white rectangular icon:
When you check the color value with a graphics editor you see that the color value changes. I would like Qt to paint the icon as is without this overlay.
The QListView here is styled with a color gradient background. But I have the same problem with a QTableView which is unstyled.
All icons are SVG by the way.