[PyKDE] Re: Threading problem with PyQt4 and Macosx

Phil Thompson phil at riverbankcomputing.co.uk
Tue Feb 27 18:16:18 GMT 2007


On Tuesday 27 February 2007 5:55 pm, Michael Guntsche wrote:
> On Feb 27, 2007, at 11:56, Phil Thompson wrote:
> > While closer to the Qt behaviour, I think it means that the
> > explanation gets
> > too complicated. I think its better to say...
> >
> > 1. If the slot is a Python callable, it's executed in the thread
> > that called
> > connect().
> >
> > 2. If the slot is a Qt slot (specified with SLOT()) then it is
> > executed in the
> > receiver's thread.
> >
> > If all you have is 1. (and the receiver is derived from QObject)
> > but you want
> > 2. then convert the method to a Qt slot using pyqtSignature and use
> > SLOT().
>
> Hello Phil,
>
> I tried the pyqtSignature+SLOT approach with the snapshot from the
> 22nd. It works for QString or int arguments,
> but if I use PyQt_PyObject it hangs again. In this case it does not
> matter WHERE I call the connect (main thread, __init__ of the thread,
> run() of the thread) it hangs every time.
> I will test it with the "-g" switch today if time permits.

You'll have to send me a revised test case.

Phil




More information about the PyQt mailing list