[PyQt] Bug obtaining signal's sender with decorated slots (was: self.sender() with new connect/signal)

Albert Cervera i Areny albert at nan-tic.com
Thu Jun 24 23:24:59 BST 2010

A Diumenge, 20 de juny de 2010, Albert Cervera i Areny va escriure:
> We're changing an application from using old-style 'connect(SIGNAL()
> SLOT())' functions to new-style 'signal.connect( slot )' ones but it
> seems that executing 'self.sender()' in the slot doesn't have the same
> behaviour as it used to because it always returns None.
> Is there a way to know who called the slot with new-style signal and slot?

The attached file demonstrates the problem. sender() function doesn't work if 
signal is emited using the new-style signal.emit() and the slot is decorated 
using @pyqtSlot()

> ----------------------------------------------------------------
> This message was sent using IMP, the Internet Messaging Program.
> _______________________________________________
> PyQt mailing list    PyQt at riverbankcomputing.com
> http://www.riverbankcomputing.com/mailman/listinfo/pyqt

Albert Cervera i Areny
OpenERP Partner
Mòbil: +34 669 40 40 18
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.riverbankcomputing.com/pipermail/pyqt/attachments/20100625/6a9ee042/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: test.py
Type: text/x-python
Size: 386 bytes
Desc: not available
URL: <http://www.riverbankcomputing.com/pipermail/pyqt/attachments/20100625/6a9ee042/attachment-0001.py>

More information about the PyQt mailing list