View Full Version : Changing font color for a single item in a QTreeView
Doug Broadwell
3rd November 2007, 19:10
I want to be able to set the Text (foreground) colors - normal and highlighted, on a single entry in a QTreeView. Is there some way to obtain the QPalette of the given entry if a have a QModelIndex to it?
Thanks
Doug
jpn
3rd November 2007, 19:14
Make data() (http://doc.trolltech.com/4.3/qabstractitemmodel.html#data) return a custom color for Qt::ForegroundRole (http://doc.trolltech.com/4.3/qt.html#ItemDataRole-enum).
Powered by vBulletin® Version 4.2.5 Copyright © 2024 vBulletin Solutions Inc. All rights reserved.