I think he means the selection color. QItemDelegate uses QPalette::Highlight for drawing the item selection.
p.
setColor(QPalette::Highlight, Qt
::red);
// or even different colors for different color groups (states)
// p.setColor(QPalette::Normal, QPalette::Highlight, Qt::green);
// p.setColor(QPalette::Disabled, QPalette::Highlight, Qt::blue);
treeWidget->setPalette(p);
QPalette p = treeWidget->palette();
p.setColor(QPalette::Highlight, Qt::red);
// or even different colors for different color groups (states)
// p.setColor(QPalette::Normal, QPalette::Highlight, Qt::green);
// p.setColor(QPalette::Disabled, QPalette::Highlight, Qt::blue);
treeWidget->setPalette(p);
To copy to clipboard, switch view to plain text mode
Bookmarks