QTableView draw custom lines
Unsolved
General and Desktop
-
Is there any way to draw custom lines, like, say, every three rows, with a different thickness?
-
Chris Kawa Lifetime Qt Championwrote on 5 Mar 2016, 20:01 last edited by Chris Kawa 3 May 2016, 20:07
Yes.
You can subclass QTreeView and override drawRow to draw anything you want - lines, shapes, text, pictures, whatever.
Sorry, I read tree view and you meant table view.
You can set an item delegate. Then you implement the delegate by subclassing QStyledItemDelegate and override the paint method in which you can draw whatever you need.
1/2