Qgis version : 2.18.1
I just want to print the ids of the selected features of a certain layer (I should specify that this layer is stored in a spatialite database), but even if I specified the correct one and manually selected features in it I can't access them via the console.
here is my code:
layer1 = QgsMapLayerRegistry.instance().mapLayersByName("Sites_atelier_vienne") selfeat = layer1.selectedFeatures()
and the result when I print :
print selfeat 
But my layer (and I checked, I have the right one in layer1) have selected features so I'm kind of stuck here.