[PyKDE] Listview problem? (segfault)

Phil Thompson phil at river-bank.demon.co.uk
Wed Jul 31 00:54:23 BST 2002


Bart Verwilst wrote:

> On Tuesday 30 July 2002 21:07, Phil Thompson wrote:
> || Bart Verwilst wrote:
> || > I finally got an example!!!
> || >
> || > I noticed that everything goes fine untill i move my mouse or
> || > something... Please check it out...
> || >
> || > On Monday 29 July 2002 02:31, Jim Bublitz wrote:
> || > || On 28-Jul-02 Bart Verwilst wrote:
> || > || > Anybody at all?
> || > || >
> || > || > On Sunday 28 July 2002 17:46, Bart Verwilst wrote:
> || > || >|| Hi!
> || > || >||
> || > || >|| My app keeps segfaulting whenever i populate a listview with a
> || > || >|| lot of
> || > || >|| entries very fast (like reading entries out of a tuple and
> || > || >|| adding them).
> || > || >|| It doesn't happen always, but most of the time...
> || > || >|| Could somebody please tell me what i'm doing wrong?
> || > || >||
> || > || >|| Thanks!
> || > ||
> || > || QListView or KListView ??
> ||
> || After, admittedly, a very quick look, you don't seem to be following the
> || guidelines in the PyQt documentation related to threads.
> ||
> And _everything_ else works perfectly (in my main app), only the populating of 
> the list segfaults.. (when i move my mouse, so i don't think it's my fault..)
> Please check it out :$


You are calling the QListViewItem ctor in a different thread. If you 
want to do that then you must use the Qt thread classes and not the 
Python thread module.

Look at the semaphore.py example included with PyQt - but be aware that 
a bug in Qt 3.0.5 can cause it problems. (Qt 3.0.4 is fine.)

Phil




More information about the PyQt mailing list