<p dir="ltr">Both should work:</p>
<p dir="ltr">QgsLabel(layer.pendingFields()).fields()[0].name()</p>
<p dir="ltr">layer.customProperty("labeling/fieldName")</p>
<p dir="ltr">Best Regards, <br>
-SL</p>
<p dir="ltr">--<br>
Sent from my mobile phone</p>
<div class="gmail_quote">Il 04/Dic/2014 23:00 "Tom Chadwin" <<a href="mailto:tom.chadwin@nnpa.org.uk">tom.chadwin@nnpa.org.uk</a>> ha scritto:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Can anyone help with this?<br>
<br>
<br>
<br>
--<br>
View this message in context: <a href="http://osgeo-org.1560.x6.nabble.com/Retrieve-field-name-used-as-label-tp5176293p5176544.html" target="_blank">http://osgeo-org.1560.x6.nabble.com/Retrieve-field-name-used-as-label-tp5176293p5176544.html</a><br>
Sent from the Quantum GIS - Developer mailing list archive at Nabble.com.<br>
_______________________________________________<br>
Qgis-developer mailing list<br>
<a href="mailto:Qgis-developer@lists.osgeo.org">Qgis-developer@lists.osgeo.org</a><br>
<a href="http://lists.osgeo.org/mailman/listinfo/qgis-developer" target="_blank">http://lists.osgeo.org/mailman/listinfo/qgis-developer</a><br>
</blockquote></div>