I want to make a custom application which includes an option just like the "Select Features by Polygon" feature in the QGIS. I am able to draw the polygon using following code:
self.rb = QgsRubberBand(self.canvas, QGis.Polygon) vertex = QgsPoint(point.x(), point.y()) self.rb.addPoint(QgsPoint)
I want to add the feature in which the polygon sort of a sticks to the mouse pointer until the polygon is completed just like the "Select Features by Polygon" in QGIS which is more user friendly. Any ideas on how to do this?