[PyQt] Threads, Signals and Slots

Phil Thompson phil at riverbankcomputing.co.uk
Fri Mar 16 22:44:51 GMT 2007


A few weeks ago we looked at problems with connecting signals to slots across 
threads. A result was a documentation change explaining that, when connecting 
to a Python callable (as opposed to a SLOT()), the slot was executed in the 
thread in which the connect() call was made.

An argument was made (I think it was Matt Newell) that the behaviour should 
follow the Qt behaviour in the case where the Python callable was a method of 
a QObject sub-class. I decided against this partly because I was lazy (more 
code to write and get wrong) and partly because the explanation (and 
therefore the understanding) of the behaviour was more complicated.

I've now decided that the current behaviour can be a bit of a pain in certain 
circumstances, and so it has been changed in tonight's snapshot.

Phil


More information about the PyQt mailing list