how can I create a new pen style in qgis 2.16?

I want to create a pen style that looks like that - - . . - - . . (dash dash dot dot). This is not defined yet.

I tried to use two simple lines and two marker lines (1st option) or four marker lines (2nd option) or use custom dash pattern (3rd option) but all does not work fine. The problems are:

1st Option: This would work fine, if it is possible to use offest in x direction (offset is only defined in y direction) for simple lines. Is this possible?

2nd Option: This would work fine too, but there is no way to use an user defined rectangle as dash.

3rd Option I tried was use custom dash pattern. Is it possible to define dash (10px) space (5px) dash (10px) space (20px)?

Is there a way to define an dash dash dot dot line?

2 Answers 2


I think your option 3 is the best bet. I managed to create something that could be usable by adding together different dash/space lengths in the custom dash window. Doing this might require a fair bit of playing with though. This was done using 2.16.1

enter image description here

  • I tried this but it does not work. Now it does. Mysterious. I use one simple line and two marker lines (dots). Thank you.
    – Kosmo
    Oct 3, 2016 at 12:56

As in another answer, you can do it with option 3, using a custom dash pattern in the layer styling panel for a line layer. However, what you want to ensure is that the cap style is set to round, that way your 'dots' will be circles and not squares.

You will want to vary the 'dot' length in accordance with your stroke width, I have shown what details I used.

QGIS screenshot showing layer panel for custom dash pattern QGIS screenshot showing custom dash pattern details

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.