On 06.04.07 08:41:26, Phil Thompson wrote: > 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).
I've put an PyErr_Print(); into the if-part and here's the output (the object parsing block is printed when in QtCore the 2nd block with the pointer is executed). So as far as I can see the problem is that id() returns a long int, but its going to be converted to an int and that fails... emodel>python simpletreemodel.py .... ------------------------- OverflowError: long int too large to convert to int ------------------------- Object parsing block ------------------------- OverflowError: long int too large to convert to int ------------------------- Object parsing block ------------------------- OverflowError: long int too large to convert to int ------------------------- Object parsing block Andreas -- Afternoon very favorable for romance. Try a single person for a change. _______________________________________________ PyQt mailing list [email protected] http://www.riverbankcomputing.com/mailman/listinfo/pyqt
