Skip to main content
added 4 characters in body
Source Link
etrimaille
  • 7.4k
  • 36
  • 49

You need to iterate over the vector layer after your signal.

def getselectionidget_selection_id(layer):
    for feature in layer.selectedFeatures():
        print(feature.id())

iface.mapCanvas().selectionChanged.connect(getselectionidget_selection_id)

You need to iterate over the vector layer after your signal.

def getselectionid(layer):
    for feature in layer.selectedFeatures():
        print(feature.id())

iface.mapCanvas().selectionChanged.connect(getselectionid)

You need to iterate over the vector layer after your signal.

def get_selection_id(layer):
    for feature in layer.selectedFeatures():
        print(feature.id())

iface.mapCanvas().selectionChanged.connect(get_selection_id)
Source Link
etrimaille
  • 7.4k
  • 36
  • 49

You need to iterate over the vector layer after your signal.

def getselectionid(layer):
    for feature in layer.selectedFeatures():
        print(feature.id())

iface.mapCanvas().selectionChanged.connect(getselectionid)