When I select items in QTableWidget
, it looks like this:
But when I focus other widget, it looks like this:
I want the items to remain blue as long as they're selected. I tried to enforce it using QSS (CSS):
QListWidget::item:selected:active, QListWidget::item:selected:!active {
background: blue;
}
QListWidget::item:selected {
background: blue;
}
Didn't help. What can I do to prevent selected items from becoming gray?
Turns out that
background:
is not the correct property to change selection background. This is correct:The text color setting still doesn't work, but it's better than nothing.