How do I Color a QTableView row in PyQt4

David Boddie david at boddie.org.uk
Wed Feb 28 19:54:42 EST 2007


[Following up my own post.]

On Thursday 01 March 2007 01:08, David Boddie wrote:

> It's interesting to see that you subclassed QSqlQueryModel instead of
> using a custom delegate to display the data. It's usually recommended
> that you subclass QItemDelegate if you want to customize the way items
> are represented, but you can also customize the model if you want.

On reflection, I think subclassing the model is probably the right
thing to do here. Delegates are much more useful if you want to
substantially alter the appearance of items, but that's not what you're
trying to do here.

David



More information about the Python-list mailing list