[PyQt] pyqtSlot

oliver oliver.schoenborn at gmail.com
Thu Aug 25 15:28:09 BST 2016


[I forgot to reply-all, resending so reaches list]


> [Oliver]

> I.e., the method wrapped is from a QObject-derived class, but

> what pyqtSlot "decorates" is a wrapper for this method. This
> > seems to have been working fine in PyQt 5.3 and 5.5, were we
> > just lucky? Is it safe in 5.7?


> [Phil]

Inspect the QMetaObject to see if the slot is there as you would expect.



[Oliver]

> If the slot weren't in the QMetaObject, how would the object method

> get called (it does get called)?
>
> [Phil]
> The same way any other type of callable is handled, by creating a proxy
> QObject when the connection is made.
>

The slot will surely be in the wrapper's proxy QObject.QMetaObject, but
what's the concern with that? As long as the connection is established from
the correct thread, the proxy QObject will be owned by the correct thread
so the proxy slot will be called in the correct thread, and this in turn
will call the slot_wrapper which will call our QObject's method. Should all
be good, no?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.riverbankcomputing.com/pipermail/pyqt/attachments/20160825/555538ef/attachment.html>


More information about the PyQt mailing list