[Qt-interest] Highlighted QTreeWidgetItem inside a QTreeWidget.

phil prentice philp.cheer at talktalk.net
Wed Nov 3 13:06:03 CET 2010


Hi
  I have a list of QTreeWidgetItem's inside of a QTreeWidget.  In certain 
circumstances I modify the text (for column 1) to be displayed in red i.e.

tableItem->setForeground(1, QBrush(QColor("red")));

This works great.  Unfortunately when I highlight that entry in the table the 
text is automatically converted to white with a blue background for all the 
columns. So I dont actually know that item is displyed in red.

  Is there any nice way of making the highlighted entry still have red text 
for that column(if it applies)..or is there something else you might 
recommend.

Thanks
Phil



More information about the Qt-interest-old mailing list