Unsolved QStyledItemDelegate: set Font Color when State is inactive
-
I have a problem setting up foreground color for etiher normal QTableWidgets or QTableWidgets with custom QStyledItemDelegate.
This is my stylesheet:
QTableWidget::item:selected:active { background-color: red; color: black; } QTableWidget::item:selected:!active { background-color: black; color: red; }
The background-color switches from red to black as expected when I focus/unfocus the Item.
But the foreground color is never applied to the text.Best Regards,
Megamouse -
Hi,
Can you show the code of your item delegate ?