Could anybody provide an example how to get the attributes of selected features?
I tried the following code in the Python Console : but I'm stuck at the point where I'd like to get the attributes:
from qgis.utils import iface
canvas = iface.mapCanvas()
cLayer = canvas.currentLayer()
selectList = []
if cLayer:
count = cLayer.selectedFeatureCount()
print (count)
selectedList = layer.selectedFeaturesIds()
for f in selectedList:
# This is where I'm stuck
# As I don't know how to get the Attributes of the features