How to change programmatically the value of attribute in one of several feature in a

المشرف العام

Administrator
طاقم الإدارة
I have a vectorlayer that contains a lot of feature, I know that each feature has an unique Id

Each of them has some propertie like coordinateX, coordinateY, color, name

With a QTimer, each 2 sec I want to change the position of one of them by change the coordinate using the QgsGeometry::fromPoint(x,y), i. e. the feature which has the Id=4 and update the Mapcanvas with the updated feature.

How Can i get the feature of a given Id ? And How can i proceed to update the mapcanvas with the change in the feature attributes ?



أكثر...
 
أعلى