[PyQt] Bug in QAbstractItemModel::createIndex()?

Phil Thompson phil at riverbankcomputing.co.uk
Fri Apr 6 08:41:26 BST 2007


On Thursday 05 April 2007 11:25 pm, Andreas Pakulat wrote:
> On 05.04.07 22:24:58, Phil Thompson wrote:
> > On Thursday 05 April 2007 6:42 pm, Andreas Pakulat wrote:
> > > Tried printfs and fprintfs (to stderr), but I don't see anything when
> > > running the python application... sip+PyQt4 is built in debug mode, do
> > > I need to do something else?
> >
> > No - assuming you've put them in the right place and installed it.
>
> I've put them into the first block of
> meth_QAbstractItemModel_createIndex() and did a make install
> afterwards....
>
> Ok, now it gets interesting I think. It doesn't hit the int-block in
> that method, it hits the object block, so when doing
>
> self.createIndex(parentItem.row(), 0, id(parentItem))
>
> the function that determines the parameters thinks the 3rd one is an
> object, not an integer.

Put a printf() in parsePass1() in siplib.c in the 'i' branch of the big switch 
statement. We want to know what exception was raised (ie. when the call to 
PyErr_Occurred() succeeded).

Phil


More information about the PyQt mailing list