I have a list of vector layers loaded in the canvas of qgis.
`layers = self.iface.mapCanvas().layers() for layer in layers: if layer.type() == QgsMapLayer.VectorLayer: self.dlg.featurecombo.addItem( layer.name(), layer )`
The above snippets of code can be used to display all the layers in the popdown box of the plugin. But it wont load all layers instead it gives results for one layer.(for example, if I have 3 layers loaded and I want a feature count for layers, it will display all 3 layers in the popdown down box but the above snippet will show the feature count for one layer It would be more helpful if i can get a snippet to load all layers and display the result for all layers at a stretch.