[PyKDE] Listview problem? (segfault)
phil at river-bank.demon.co.uk
Wed Jul 31 11:03:00 BST 2002
Paul Felix wrote:
> Hi Bart,
> You might be able to avoid the problem by locking and unlocking the
> mutex when creating each listview item:
> QListViewItem(self.win.ListView1, "bleh")
> This seems to work for me using PyQt 3.3.2 and Qt 3.0.5.
Yes, I think this is the correct fix.
> Phil, you advise calling the PyQt API from one thread only. Do you
> inherent problem in calling the PyQt API from a second thread if the
> mutex is properly locked/unlocked when doing so?
I advise calling the PyQt API from one thread only *if* you are using
the Python thread module.
If you are using the Qt thread classes then you can call the PyQt API
from any thread so long as you handle the Qt global lock properly -
exactly as you suggest.
More information about the PyQt