Phil Mc wrote: > Hi all - > a question I've been stumped on, and Googling the Qt mailing lists isn't > turning up much that's useful: what's the best way to draw a QTableView > without the focus rectangle appearing? The goal is to set a background > color for an active row (which is simple enough with stylesheets and a row > selection behavior!) but to avoid having the focus rectangle drawn on top > of that. > > Clearing the selection model or otherwise removing focus after the row's > been drawn removes the focus rectangle, but it also disables key > navigation...
The drawing of each individual cell is handled by the QItemDelegate class. If you override the virtual drawFocus() function to do nothing, then you can avoid the focus rect. best regards, Gunnar _______________________________________________ Qt-jambi-interest mailing list [email protected] http://lists.trolltech.com/mailman/listinfo/qt-jambi-interest
