[PyQt] Bugs galore in QAbstractTableModel???

Ian hobson42 at gmail.com
Sat Nov 27 20:54:01 GMT 2010


Hi Everyone,

I am trying to use QAbstractTableModel and I am having more than some 
difficulty.

If I return the correct number to columnCount I get no headers. If I 
return a number that is too big, I get headers, but the model is asked 
for headers and data for columns that don't exist!

Everywhere I return a String in the data()  routine, this is displayed 
with a check box - even if I cast it to QVariant.

If I call  resizeColumnsToContents() on the view, all the columns are 
set to a very small size that shows only the check boxes. :(

I am using Python 2.7,  PyQt 4.7.4 and Windows 7 (64 bit).

I don't believe that QAbstractTableModel  can be quite that buggy.  So 
what am I doing wrong?

Anyone? Please?

Ian










More information about the PyQt mailing list