How to create and edit a polyline in QGIS

To create a new polyline in QGIS:

Layer > New shapefile layer

Select line as geometry and set the name for the layer, e.g. test. At this point, you can assign attributes to the line. We'll create only one attribute as an example (line's name), and it will be string type:

New shapefile layer

Now, click on the pencil icon at first and on the line icon afterwards:

Draw line QGIS

When you finish to draw, do a right-click, and you'll be able to configure the line attributes.

Line attributes QGIS

To edit a line, click on the pencil first and on the edit icon afterwards:

Edit line QGIS

Now you can select the point that you want to edit. If you click on the +, you'll be able to extend the line:

Edit line QGIS

Hi, I'm Erik, an engineer from Barcelona. If you like the post or have any comments, say hi.