[PyQt] QObject::​sender() returns the original object that sent the signal

Alan Ezust alan.ezust at gmail.com
Wed Feb 11 04:12:57 GMT 2015


I noticed that if you pass a Qt.QueuedConnection as the connection type for
connect, you will get the proper sender() of signals in your slots.

For some reason Qt.DirectConnection connections do not set the proper
sender of the signal.



On Tue, Feb 10, 2015 at 7:15 PM, iMath <2281570025 at qq.com> wrote:

> In PyQt4,QObject::​sender() returns the direct object that sent the
> signal,while in PyQt5,it  returns the original object that sent the
> signal.
>
> QObject::​sender() should return the DIRECT object that sent the signal or
> cause so many problems .‍
>
> _______________________________________________
> PyQt mailing list    PyQt at riverbankcomputing.com
> http://www.riverbankcomputing.com/mailman/listinfo/pyqt
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.riverbankcomputing.com/pipermail/pyqt/attachments/20150210/b1acba55/attachment.html>


More information about the PyQt mailing list