Ann Tulliani wrote > The one proposed workaround I found online > is > https://gis.stackexchange.com/questions/318190/setting-qgis-to-show-feature-count-always-when-layer-is-loaded. > Following it, inside my /home/tulliani/.qgis2/python/startup.py I have:
Hi Ann, are you using QGIS 2.x? Ann Tulliani wrote > Does anyone have any suggestions on how to update that code to make it > work for multiple addition of layers? You could try with: def showFeatureCount(layers): for layer in layers: if layer.type() == QgsMapLayer.VectorLayer: root = QgsProject.instance().layerTreeRoot() myLayerNode = root.findLayer(layer.id()) myLayerNode.setCustomProperty("showFeatureCount", True) Regards. Andrea Giudiceandrea -- Sent from: http://osgeo-org.1560.x6.nabble.com/QGIS-User-f4125267.html _______________________________________________ Qgis-user mailing list Qgis-user@lists.osgeo.org List info: https://lists.osgeo.org/mailman/listinfo/qgis-user Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user