[PyKDE] Possible PyQt bug??(simple test file attached)

Huaicai Mo huaicai at nanorex.com
Sat Aug 27 00:40:15 BST 2005


For some reason, my description for the problem was removed somehow in my
previous post. Only the test file was kept. Again, here is the description:

 

 

Hello,

 

For the list of QFileInfo objects returned by entryInfoList(), if I pass the
object instead of its file name (a string) to a receiver. Later, if I try to
get its file name from the object through the receiver, Python will crash.
On the other hand, if I pass its file name to the receiver, then there is no
problem.  My guess is that the list of QFileInfo objects has been destroyed
even though other object still refers to them.

 

The test code is modified from the "Directory Browser" example code coming
with PyQt. You can test the above 2 cases by changing line 47(marked in
code) into:

        passByName = 0  

or 

        passByName = 1 

 

Use your mouse to select any file in the browser window.  If you use
"passByName=0", the program will crash, otherwise, it will print the file
name that you selected.

 

BTW, I'm using Python 2.3.4, Qt 3.3.3, PyQt  3.12

 

Huaicai

 

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.riverbankcomputing.com/pipermail/pyqt/attachments/20050827/889e317a/attachment.html


More information about the PyQt mailing list