On 27/11/10 21:27, Ian wrote:
On 27/11/2010 21:07, Andreas Pakulat wrote:
On 27.11.10 20:54:01, Ian wrote:
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.
There's a C++ class called QModelText which sanity-checks models, I
believe that an older version was converted to python and is included in
PyQt4. Run it on your model, fix the problems and see wether that helps.

Thanks for your reply Andreas,
I can find nothing about QModelText, and QModelTest appears to have a
few bug reports and
nowhere to download it and no instructions as to how to run it, and is
not on my hard disks.

the python version andreas is referring to is "modeltest.py". it can be found in the pyqt source in the contrib/pymodeltest directory.
_______________________________________________
PyQt mailing list    PyQt@riverbankcomputing.com
http://www.riverbankcomputing.com/mailman/listinfo/pyqt

Reply via email to