[PyQt] Bugs galore in QAbstractTableModel???

Andreas Pakulat apaku at gmx.de
Sat Nov 27 21:07:49 GMT 2010


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.

If it doesn't, provide sample code, without it its not really possible
to help you.

Andreas

-- 
You've been leading a dog's life.  Stay off the furniture.


More information about the PyQt mailing list