PDA

View Full Version : make QTableView work as a multi-column list view



wesley
11th March 2008, 15:33
Hello,guys,
I am going to subclass QTableView and make it work as a multiColumn list view, may be a item delegate need.

I used setSelectionBehavior(QAbstractItemView::SelectRows ) to make all columns of one row show focus.

But now, I have a problem with QTableView, how can I draw a cursor bar image on the current row?
QTableView does not like QTreeView that has a virtual protected interface named draw() which we can reimplement to paint something before drawing the columns of row.

QTableView call its item delegate to draw each cell directly, how can I draw a cursor bar image for current row?

any idea is welcome.! ^_^

wysota
11th March 2008, 15:43
What do you mean by a "cursor bar image"?