[PyKDE] linux pyqt/pykde multithread application. How to send signal/ update state of app from non qt loop threads ?

Mateusz Korniak mateusz at ant.gliwice.pl
Thu Apr 13 15:27:19 BST 2006


I have multithread pyqt/pykde application.
I leave first thread to run qt-loop.

I want long execution time code to be run in different threads as in 
background. [1]

How can I interact from those background threads with my qt GUI ? (send 
signal, update text in QLineEdit) ?

I figured out in docs that below code should work:

qt.qApp.lock()
some.qlineedit.setText(txt)
some.statusBar().message(txt)
qt.qApp.unlock()

But when using NPTL: even calling 
qt.qApp.lock()
qt.qApp.unlock()
freezes whole app

Using linuxthreads sometimes code works, sometimes app freezes.

Any hints how it should be done ?

[1]. No, I can not make this app one-thread.

TIA and best regards,
-- 
Mateusz Korniak




More information about the PyQt mailing list