Don't use QgsLabel it is the old label engine and will be removed in the future.
- Nathan On Fri Dec 05 2014 at 9:27:14 AM Tom Chadwin <tom.chad...@nnpa.org.uk> wrote: > > QgsLabel(layer.pendingFields()).fields()[0].name() > > That doesn't work - it gives the field at position 0, not the labelling > field. > > > layer.customProperty("labeling/fieldName") > > But this does work perfectly. Thank you so much. > > Tom > > > > -- > View this message in context: http://osgeo-org.1560.x6. > nabble.com/Retrieve-field-name-used-as-label-tp5176293p5176555.html > Sent from the Quantum GIS - Developer mailing list archive at Nabble.com. > _______________________________________________ > Qgis-developer mailing list > Qgis-developer@lists.osgeo.org > http://lists.osgeo.org/mailman/listinfo/qgis-developer >
_______________________________________________ Qgis-developer mailing list Qgis-developer@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-developer