I would like to run a loop with PyQGIS, it should wait for the user to press a key either SpaceBar or Escape to continue.
canvas = qgis.utils.iface.mapCanvas()
aLayer = canvas.currentLayer()
feat = QgsFeature()
iter = aLayer.getFeatures()
while iter.nextFeature(feat):
aLayer.removeSelection()
aLayer.select(feat.id())
qgis.utils.iface.actionZoomToSelected().trigger()
How can I do that?
No comments:
Post a Comment