When you are creating a polyline, press the Tab key or click the start node to create a closed polyline and form a polygon.
To create a polygon from an existing open polyline:
. Release the mouse button to join the start and end nodes.
You can also create polygons from existing open polylines using the options on the Vector > Close submenu.