Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
QTableView QHeaderView Sorted Column Style.
I would like to change text color in header if column is sorted. I try to use style:
Exists any easy way ho to set this text color via stylesheet?
I think this is not possible using stylesheets.
But you should be able to achieve what you want in your model.
By reimplementing headerData() and for the Qt::ForegroundRole return your desired QColor if the section is sorted. Otherwise return the result from the base class implementation.
This post is deleted!
@raven-worx Thanks a alot....it works. Better than my workaround to override paintSection in QHeaderView.