By default, the QTableView changes the selection color to grey when the control loses focus. I would like to remove this behavior and have the selection color be blue regardless of focus. How do I achieve this?
By default, the QTableView changes the selection color to grey when the control loses focus. I would like to remove this behavior and have the selection color be blue regardless of focus. How do I achieve this?
Have you tried this ?
viewOption.palette.setColor(QPalette::Text, getColor(QColor);
Also use setAlternatingRowColors(true);
That worked! Thanks!!
Bookmarks