2

I'd like to have a QTableWidget where the currently selected cell is indicated by adding a black circle over the cell's icon (I have gotten this much to work). I'm currently struggling with the fact that the widget seems to apply a blue tint to the selected cell's icon. I can't find any documentation referring to this. I have tried setting this stylesheet:

QTableWidget::item {selection-background-color: transparent;
selection-color: transparent;};
QTableWidget::item:selected{ background-color: transparent }

But these affect the background and text colors of the cell, respectively. I have also attempted to change the QTableWidget's QPalette's Highlight color, without success.

How do I get rid of this tint?

Haem
  • 929
  • 6
  • 15
  • 31
  • Doesn't this solution work for you: http://stackoverflow.com/questions/7840325/change-the-selection-color-of-a-qtablewidget? – agold Oct 01 '15 at 12:16
  • @agold: I'm afraid not. I'm editing in the addition I tried after re-reading that answer. – Haem Oct 01 '15 at 12:22

1 Answers1

2
QTableWidget::item {selection-background-color: rgba(0,0,139, 100);
selection-color: rgba(0,0,139, 50);};
QTableWidget::item:selected{ background-color: rgba(0,0,139, 100) }

Applying opacity of 50% to background color.. will give you changes to you.. This styles will get you blue tint color..

This approach will helps you better..

Senthil Kumar
  • 562
  • 1
  • 6
  • 14