[Qgis-developer] PyQT - How to get layer sending attributeValueChanged signal?

Hugo Mercier hugo.mercier at oslandia.com
Wed Feb 26 01:28:25 PST 2014


Hi,

Note that you can also use an indirect function call when you connect
the signal, thanks to lambda. For instance :

myLayer.attributeValueChanged.connect( lambda : self.myslot(myLayer) )

Le 24/02/2014 17:01, Régis Haubourg a écrit :
> Hi Matthias, 
> thanks for the pointer. My plugin main class does not inherits from anything
> and I get the following error:
> 
>  line 173, in labelLayerModified
>     sender = self.sender()
> AttributeError: EasyCustomLabeling instance has no attribute 'sender'
> 
> Should I inherit my class from a higher QT or PyQt4 object, and which one? 
> 
> Cheers
> Régis
> 
> 
> 
> 
> --
> View this message in context: http://osgeo-org.1560.x6.nabble.com/PyQT-How-to-get-layer-sending-attributeValueChanged-signal-tp5105532p5105587.html
> Sent from the Quantum GIS - Developer mailing list archive at Nabble.com.
> _______________________________________________
> Qgis-developer mailing list
> Qgis-developer at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/qgis-developer
> 


-- 
Hugo Mercier
Oslandia


More information about the Qgis-developer mailing list