[PyKDE] Listview problem? (segfault)

Bart Verwilst verwilst at gentoo.org
Wed Jul 31 13:50:00 BST 2002


On Wednesday 31 July 2002 03:46, Paul Felix wrote:
|| Hi Bart,
||
|| You might be able to avoid the problem by locking and unlocking the Qt
|| library mutex when creating each listview item:
||
||   qApp.lock()
||   QListViewItem(self.win.ListView1, "bleh")
||   qApp.unlock()
||
|| This seems to work for me using PyQt 3.3.2 and Qt 3.0.5.
||
Thanks! that works!!

Now, if i have let's say 3 classes..

win() => the class that my .ui generates
sock() and bleh()

sock has the QThread inherited(so it's the one that holds the code you 
mentioned) but inside sock, can i execute the bleh() function with some 
arguments, that for example parses the socket string i receive, like this?:

test = slef.bleh("my", "args")
print test

?

Or do i need to put a "qApp.lock()" "qApp.unlock()" around every external 
function i call?

Thanks so very much in advance!


-- 
Bart Verwilst
Gentoo Linux Developer, Release Coordinator
Gent, Belgium




More information about the PyQt mailing list