Set the outline of the polygons to No Pen
, then add an additional symbol layer of the type Outline: Simple line
. There, you can make custom settings as shown in the following screenshot:
Edit
As you have everything on the same layer, you need to apply a different approach:
Create an own symbol layer for each admin level and order them accordingly (highest hierarchical level on the top).
To get the red outline, set the top symbol layer to type to
Geometry Generator
and paste this expression:buffer (collect( $geometry), 0)
, then style the solid outline. The expression creates one single polygon from all features.To get the blue dashed line, this time in the Geoemetry generator paste this expression to get different polygons for each
regional_admin
level:buffer (collect( $geometry, group_by:="regional admin"), 0)
. Again style the line (I usedOutline: Simple Line
) to get the dashed blue line.Repeat the same for the local level. Here, you don't need a Geoemtry generator, as each individual polygon should be represented.
If you now want to hide the black dotted line under the blue dashed line, there is a trick: click on the
Simple Line
entry (the one that generates the blue line, no. 1 in the screenshot) and press the green plus to add another line style. Set this (no. 2 on the screenshot) to a solid white line so that it covers everythin underneath: the black dotted line will be covered by the white one, whereas the blue dahsed line is still visible.
See details on the screenshot: