[PyQt] subclass QTableView's delegate

Paulino paulino1 at sapo.pt
Sat Sep 15 11:26:29 BST 2007


I would like to subclass the QTableView's default delegate to customize 
the way date-time and double columns are rendered and edited.

I can do it when I know the column index that contains the specific data 
But this is a QTableView is to be connected to several different tables 
in a MS-SQL database, so I have to find what data type each column will 
display and apply the suitable editor and renderer.

The double values are rendered OK, but the editor (a spinbox) allows 
values in the range 0,0 to 99,99, that I want to change.

Datatime values are rendered as datetime's, but I'm only interested in 

Thank You


More information about the PyQt mailing list