Unsolved 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?
raven-worx Moderators last edited by
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.