Customize QTableView
General and Desktop
3
Posts
3
Posters
2.4k
Views
1
Watching
-
wrote on 14 Apr 2013, 12:49 last edited by
Hi
I need some help for my Qt Application .In my application i had QTableView in this table contain two columns when application load column 2 value greater than column 1 value i want to change that row color into red if any one have idea about that ? or any experience about that ?(specially i want to know what kind of techniques i want to follow to achieve my target )Thanks
-
"QStyledItemDelegate":http://qt-project.org/doc/qt-4.8/qstyleditemdelegate.html is your friend in that case.
There are some examples available. But basically you just need to rewrite the paint method in the delegate. -
wrote on 14 Apr 2013, 14:23 last edited by
Or you change the color in the model. That goes against the MVC paradigm, but might be faster to do.
2/3