0

I am working with qgis 1.8 and i want to know how many polygon drawed in one edit sessions is there any signal emitted with qgis ???

1 Answer 1

1

The signal QgsVectorLayer.featureAdded( QgsFeatureId fid ) is emitted whenever a new feature is added to the layer.

If you have to group the count by edit sessions you can also connect to the signals editingStarted and editingStopped.

Use like:

layer.featureAdded.connect(yourhandlermethod)
3
  • Thank you for your answer so in python i have: layer = qgis.utils.iface.activeLayer() i can use it like this : layer.featureAdded( QgsFeatureId fid ) ?
    – Zaghouani
    Commented Jul 2, 2013 at 9:18
  • i obtaint this error : native Qt signal is not callable
    – Zaghouani
    Commented Jul 2, 2013 at 9:29
  • 1
    See edited answer.
    – Nathan W
    Commented Jul 2, 2013 at 9:42

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.