<div dir="ltr">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.<br><br>For some reason Qt.DirectConnection connections do not set the proper sender of the signal. <br><br><br></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Feb 10, 2015 at 7:15 PM, iMath <span dir="ltr"><<a href="mailto:2281570025@qq.com" target="_blank">2281570025@qq.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div>In PyQt4,<span style="line-height:1.5">QObject::​sender() returns the direct object that sent the signal,while in PyQt5,it </span><span style="line-height:1.5"> returns the original object that sent the signal.</span></div><div><span style="line-height:1.5"><br></span></div><div>QObject::​sender() should return the DIRECT object that sent the signal or cause so many problems .<span style="line-height:0px">‍</span></div><br>_______________________________________________<br>
PyQt mailing list    <a href="mailto:PyQt@riverbankcomputing.com">PyQt@riverbankcomputing.com</a><br>
<a href="http://www.riverbankcomputing.com/mailman/listinfo/pyqt" target="_blank">http://www.riverbankcomputing.com/mailman/listinfo/pyqt</a><br></blockquote></div><br></div>