Skip to main content
Post Reopened by mgri, whyzar, PolyGeo
edited tags; edited title
Link
PolyGeo
  • 65.4k
  • 29
  • 114
  • 345

Getting features attributes on feature selection in QGIS python?

added 14 characters in body
Source Link
mgri
  • 16.3k
  • 6
  • 48
  • 80

I want to know how to get features from a layer on click event.. using python(m trying to create a plugin).. the below code always show 0 output

layer = iface.activeLayer()

selection = layer.selectedFeatures()

print len(selection)

for feature in selection: print feature['NAME']

layer = iface.activeLayer()
selection = layer.selectedFeatures()
print len(selection)
for feature in selection:
    print feature['NAME']

I want to know how to get features from a layer on click event.. using python(m trying to create a plugin).. the below code always show 0 output

layer = iface.activeLayer()

selection = layer.selectedFeatures()

print len(selection)

for feature in selection: print feature['NAME']

I want to know how to get features from a layer on click event.. using python(m trying to create a plugin).. the below code always show 0 output

layer = iface.activeLayer()
selection = layer.selectedFeatures()
print len(selection)
for feature in selection:
    print feature['NAME']
added 189 characters in body
Source Link

Getting features attributes on layer click forfeature selection in QGIS plug-in?python

I want to know how to get features from a layer on click event.. using python(m trying to create a plugin).. the below code always show 0 output

layer = iface.activeLayer()

selection = layer.selectedFeatures()

print len(selection)

for feature in selection: print feature['NAME']

Getting features attributes on layer click for QGIS plug-in?

I want to know how to get features from a layer on click event.. using python(m trying to create a plugin)

Getting features attributes on feature selection in QGIS python

I want to know how to get features from a layer on click event.. using python(m trying to create a plugin).. the below code always show 0 output

layer = iface.activeLayer()

selection = layer.selectedFeatures()

print len(selection)

for feature in selection: print feature['NAME']

edited tags; edited title
Link
PolyGeo
  • 65.4k
  • 29
  • 114
  • 345
Loading
Post Closed as "Not suitable for this site" by ahmadhanb, PolyGeo
Source Link
Loading