Hi,
I was wondering if someone could point out why I can't set background color of a QTreeWidget's header item? I was able to set the foreground of it but cannot change the background color. Here is what I do:
myTree->setHeaderLabels(QStringList() << "blah" << "blah" << "blah";
QTreeWidgetItem *header = myTree->headerItem();
header->setForeground(1, QBrush(Qt::red)); // <<== this works!
header->setBackground(1, QBrush(Qt::green)); // <<== this does not work!
Any help is greatly appreciate.
Bookmarks