[PyKDE] QListView returns base instead of sub class pointer

Torsten Marek shlomme at gmx.net
Sat Nov 1 17:08:01 GMT 2003


Hello Phil, hello all

I recently installed sip4 on my machine and so far, it works very fine. 
I even ported my own project from sip3 to sip4. But with another program 
of mine, I am experiencing a strange behaviour:
In a subclassed QListView, there are several hundred items, all of one 
subclasses of QListViewItem. The items get inserted on startup and saved 
on close.
Now, if I traverse the tree (whether by hand or using a generator 
function), the problem occurs that sometimes firstChild() from the items 
returns not a pointer to the python item but to the QListViewItem 
underneath and attribute errors occur. I tried out to isolate the code 
and sometimes no errors occurs, otherwise between one and five wrong 
references.
As mentioned above, I cannot find the source of the problem, so I cannot 
post any code until now, but the program is available from 
http://linux.ratsstar.de/arborfelix/. I think that the problem only 
occurs in sufficiently large trees, so I could post some sample data to 
the list.

So far, maybe I find something which could give a hint

greets

Torsten
-- 
Torsten Marek <shlomme at gmx.net>
ID: A244C858 -- fingerprint 1902 0002 5DFC 856B F146  894C 7CC5 451E 
A244 C858
www.keyserver.net -- wwwkeys.eu.pgp.net

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 251 bytes
Desc: not available
Url : http://www.riverbankcomputing.com/pipermail/pyqt/attachments/20031101/8c4c2d74/attachment.bin


More information about the PyQt mailing list