I'm new to PyQGIS and I'm having some dificulties. I'm trying to implement / utilize "Add Feature" (polyline) functionality in my python plugin. I know I can do this by defining starting and ending points.
PyQGIS, construct a polyline:
line_start = QgsPoint(50,50) line_end = QgsPoint(100,150) line = QgsGeometry.fromPolyline([line_start,line_end])
This is what I'm trying to avoid. I'd like user to digitize / create polyline by clicking on map canvas to preview geometry. How can I do that?