Dear All,<br><br>I am struck with a problem while handling Signal and slot through pyqt<br><br>The problem is as follows:<br><br>I have three different menu items, each connected to the same event.<br>In side my event handling function , I want to find out which menu item was clicked.<br>
<br>I tried self.sender().objectName(),<br><br>But I get the following error: (&quot;TF is my class name&quot;)<br><br><b>AttributeError: TF instance has no attribute &#39;sender&#39;</b><br><br>When I tried to inherit the QObject class in my class, the above error is gone, but instead of getting the message &quot;inside&quot; it is not showing anything. (Neither the error message nor the &quot;inside&quot; message).<br>
<br>The code is as follows:<br><br>QtCore.QObject.connect( self.Pch, QtCore.SIGNAL(&quot;triggered()&quot;), self.CR_Clicked )<br>QtCore.QObject.connect( self.TFe, QtCore.SIGNAL(&quot;triggered()&quot;), self.CR_Clicked )<br>
QtCore.QObject.connect( self.IE, QtCore.SIGNAL(&quot;triggered()&quot;), self.CR_Clicked )<br><br>def CR_Clicked(self):<br>        eventName = self.sender().objectName()<br>                <br>        infoString = QString(&quot;inside&quot;)<br>
        QMessageBox.information(self.iface.getMainWindow(),&quot;SF&quot;,infoString)<br><br><br>It will be very kind of you if you can let me know as of where I am going wrong, or direct me to any link.<br><br><br>With Warm Regards,<br>
Bishwarup<br>