[PyQt] QAbstractItemModel subclass + QTreeView brickwall
Andreas Pakulat
apaku at gmx.de
Sun Nov 25 21:12:09 GMT 2007
On 25.11.07 21:17:12, Simon Edwards wrote:
> Hello all,
>
> I'm having a hard time getting a QTreeView widget to work with my own
> model. I've tried translating the "Simple Tree Model Example" from the Qt
> docs, but it still doesn't work. Does anyone have working example code for
> a QAbstractItemModel, or know what is going wrong?
Huh? That example is already existing in a PyQt version, see
examples/itemviews/simpletreemodel/ in the PyQt sources
> Tested on PyQt 4.3 + Qt 4.3.2, and kde's qt-copy (pre Qt 4.4-ish)
That last part is wrong, its Qt4.3.2, though created from a snapshot not
from an official tarball.
> Some of the methods get called (I've left the debug
> in), but nothing is displayed.
Check contrib/pymodeltest/ add that to your model and it should help you
to find which of your models methods don't work according to the
"contract".
Andreas
--
Slow day. Practice crawling.
More information about the PyQt
mailing list