How to change color of text in Qtreeview
-
How to change color of text in Qtreeview
-
How to change color of text in Qtreeview
@Qt-Enthusiast
Many ways. If yourQTreeViewhas a model, one way is via the model'sdata()method, look at the possiblerolevalues parameter to that. That's assuming you want the color to vary per item. If you only want to change all texts' color there are simpler ways. -
I want to change per item
-
I want to change per item
@Qt-Enthusiast
So like I said, look at http://doc.qt.io/qt-5/qabstractitemmodel.html#data and http://doc.qt.io/qt-5/qt.html#ItemDataRole-enum (Qt::ForegroundRole).