1 Attachment(s)
How to change color of single header cell?
Hello. I have a QStandardItemModel, with QStandardItems in it, all in QTableView.
I have to make certain column headers to be different color and possibly different text. Let's post an example table then:
Attachment 10756
As you can see first colum and first row font is different because I tried changing color and other stuff in it with this:
Code:
col1->setForeground(Qt::red);
col1->setBackground(Qt::green);
col1
->setFont
(QFont("arial",
11));
setHorizontalHeaderItem(0, col1);
So changing font works just fine, but colors, nope...
any ideas?
Re: How to change color of single header cell?
Re: How to change color of single header cell?
Maybe the widget style you use does not allow that.