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

Matthias Kuhn matthias.kuhn at gmx.ch
Mon Feb 24 06:21:02 PST 2014


Hi Régis

Calling sender() in your SLOT should return the QgsVectorLayer object
There is also QSignalMapper [1] which has a cleaner concept, but it 
looks as if this will on the one hand help you to identify the source 
layer, but you will loose any other parameters, what's probably not 
your intent.

Best
Matthias

[1] http://qt-project.org/doc/qt-4.8/qsignalmapper.html

On Mon 24 Feb 2014 02:57:37 PM CET, Régis Haubourg wrote:
> Hi,
> I would like to catch the layer or layer id that is sending
> attributeValueChanged signal.
> This signal carries only  QgsFeatureId fid,	int  	idx, const QVariant & ) 	
>
> Any idea how to do this in a clean way?
>
> Cheers,
> Régis
>
>
>
> --
> View this message in context: http://osgeo-org.1560.x6.nabble.com/PyQT-How-to-get-layer-sending-attributeValueChanged-signal-tp5105532.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




More information about the Qgis-developer mailing list