Hi,

On Wednesday 12 August 2009 19:04:46 Lukas Hetzenecker wrote:
> is it possible to connect signals from a Widget to a slot in a QThread and
> ensure that the Widget responds to keypress and mouse events?
> I attached my first try, but it doesn't work, the UI blocks until the
> execution of the function is finished.

Without looking at the code: This is not a problem with Qt but with python. 
The keyword is GIL, the global interpreter lock which ensures that only one 
thread is executing python in this runtime instance.

There are two ways to have "true" threads:
1) Implement the thread in C++ and bridge it to python with SIP the same way 
Qt is bridged to python.
2) Use processes instead of threads. Then you can run several instances of the 
python interpreter at the same time.

Arnold

Attachment: signature.asc
Description: This is a digitally signed message part.

_______________________________________________
PyQt mailing list    [email protected]
http://www.riverbankcomputing.com/mailman/listinfo/pyqt

Reply via email to