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

Detlev Offenbach detlev at die-offenbachs.de
Sun Apr 5 16:56:40 BST 2015


Some people have reported the very same issue for eric as well. However, it doesn’t seem to be reproducible (maybe a memory corruption issue).

Detlev

> Am 05.04.2015 um 13:10 schrieb Yuya Nishihara <yuya at tcha.org>:
> 
> On Sun, 5 Apr 2015 11:17:18 +0800 (CST), redstone-cold wrote:
>> sorry ,I posted the wrong code last time, this is the right code 
>> https://bpaste.net/show/a8a5c72f9c0c
>> for slotFinished() if decorated with @pyqtSlot() in PyQt5 seems works fine ,
>> but if not ,
>> 
>> Traceback (most recent call last):
>>  File "E:\network.py", line 57, in slotFinished
>>    print(reply, reply.error())
>> AttributeError: 'QAction' object has no attribute 'error'
>> 
>> PyQt4 doesn't care if  slotFinished() decorated with @pyqtSlot() or not ,
>> while PyQt5 does ,anyone can explain why ?
> 
> Perhaps, reply.abort() doesn't emit finished() immediately (i.e. in the same
> call stack) on your Qt4 environment. My PyQt4 has the same issue.
> 
>  Debian Linux sid
>  libqt4-core 4:4.8.6+git64-g5dc8b2b+dfsg-3
>  python-qt4 4.11.2+dfsg-1
> 
> Regards,
> _______________________________________________
> PyQt mailing list    PyQt at riverbankcomputing.com
> http://www.riverbankcomputing.com/mailman/listinfo/pyqt

Detlev Offenbach
detlev at die-offenbachs.de





More information about the PyQt mailing list