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:
help.jpg
As you can see first colum and first row font is different because I tried changing color and other stuff in it with this:
col1->setForeground(Qt::red);
col1->setBackground(Qt::green);
col1
->setFont
(QFont("arial",
11));
setHorizontalHeaderItem(0, col1);
QStandardItem *col1 = new QStandardItem("Column 1");
col1->setForeground(Qt::red);
col1->setBackground(Qt::green);
col1->setFont(QFont("arial", 11));
setHorizontalHeaderItem(0, col1);
To copy to clipboard, switch view to plain text mode
So changing font works just fine, but colors, nope...
any ideas?
Bookmarks