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

Florian Bruhin me at the-compiler.org
Sat Apr 4 12:27:50 BST 2015


* redstone-cold <redstone-cold at 163.com> [2015-04-04 19:08:05 +0800]:
> I saw some fix on QObject::sender() showed in the change log, but as I tested, the bug has not been fixed yet .
> 
> 
> tested code here
> 
> https://bpaste.net/show/9605c5d7e849
> when self.deleteTasks triggered, self.sender() should return QNetworkReply rather than QAction
> 
> 
> if the url doesn't work there, please use another URL without redirection and also  direct to some large file.

I don't understand - how would the self.deleteTasks QAction possibly
know anything about the QNetworkReply? It's an object ompletely
independent from the reply. And deleteTasks.triggered gets sent by the
QAction, so why would self.sender() suddenly be a QNetworkReply?

Florian

-- 
http://www.the-compiler.org | me at the-compiler.org (Mail/XMPP)
   GPG: 916E B0C8 FD55 A072 | http://the-compiler.org/pubkey.asc
         I love long mails! | http://email.is-not-s.ms/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://www.riverbankcomputing.com/pipermail/pyqt/attachments/20150404/483f5671/attachment.sig>


More information about the PyQt mailing list