PyQGIS make screenshot of mapCanvas after setExtent is called

I have the following function: def createScreenshots(layer): counter = 0 for feature in layer.getFeatures(): counter += 1 point = feature.geometry().asPoint() qgis.utils.iface.mapC...