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

iMath 2281570025 at qq.com
Sat Mar 14 02:37:30 GMT 2015


I saw some fix on QObject::​sender() showed in the change log, but as I tested, the bug has not been fixed yet .‍




------------------ 原始邮件 ------------------
发件人: "phil";<phil at riverbankcomputing.com>;
发送时间: 2015年2月13日(星期五) 晚上9:54
收件人: "pyqt"<pyqt at riverbankcomputing.com>; 

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



On 11/02/2015 3:15 am, iMath 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 .‍

According to my tests PyQt4 and PyQt5 behave the same. sender() behaves 
differently if you decorate the slot with pyqtSlot(). I haven't quite 
worked out why that is the case.

Phil
_______________________________________________
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/20150314/237b39a6/attachment.html>


More information about the PyQt mailing list