Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

Hy,

I'm building a plugin in python that manage some lists of wkt from different intern sources (web services, bd, etc..). I can display every source without any problem.

For displaying them, I use a QVectorLayer of type "memory" (in qgis 1.7.4 by the way).

I would like the user to be able to edit a feature (the geometry) when it's possible, and I would change the value according to the source.

So I was very interested by:

void QgsVectorLayer::geometryChanged(QgsFeatureId fid, QgsGeometry &geom)

Doc is here

But when I write this:

layer.geometryChanged.connect(self._geometryChanged)
[...]
@QtCore.pyqtSlot()
def _geometryChanged(self, fid, geom):
    [...]

I've got this error:

AttributeError: 'QgsVectorLayer' object has no attribute 'geometryChanged'

Any idea How I could do it ? Is there any better doc about inner elements in QGis ?

share|improve this question
add comment

1 Answer

up vote 1 down vote accepted

You can't find it because it doesn't exist in the 1.7.4 python bindings.

The geometryChanged signal was added at commit 9f4996fc210eaa8c2495c912bc7214d37256ea63 on Jan 13th 2012

You only option in order to use this signal is to upgrade to the latest build.

share|improve this answer
    
Thanks you very much. I will try do to it an other way... –  Djab Apr 25 '12 at 12:47
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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