as far as I unterstood right, if You use one style, you are able to set
in expression editor something like

if layer = "layer_id_1", '#99ff0000',

    if layer = "layer_id_2", '#9900ff00,

The code above show the way the right syntax is in help panel.

This works for nearly every option in the style dock, save this style.

Then go to Layer-dock and click with right mouse on the layer you edited
right now, point to "copy style > style".

If your layers are organized in a group (I recommend for this step),
than you can say "paste style" to this group and the style is on every
layer ... it's magic :-)


Am 01.04.2022 um 12:04 schrieb Roland Spielhofer via Qgis-user:
Hi,
thanks for the tip!
The layers are all of the same type (content is the same, they
represent different days).
I wanted to preserve the different fill colors and just change the
opacity and pen stroke.
Therefore copy stlye does not work.
Anyway, I adjusted the layers manually meanwhile - was just curious if
there is an elegant way to do this and save time next time.
Regards,
Roland
*Gesendet:* Freitag, 01. April 2022 um 10:37 Uhr
*Von:* "L.W. via Qgis-user" <[email protected]>
*An:* "Raymond Nijssen" <[email protected]>, [email protected]
*Betreff:* Re: [Qgis-user] Change properties of multiple layer at once
May you change the style itself and set the same style to all layers.

You can change i.e. color of lines by "type of line" / attribute values
so you can use one style for multiple layers.


Am 01.04.2022 um 10:13 schrieb Raymond Nijssen via Qgis-user:
> Don't know how to do that using the GUI, but for the opacity you can
> use these 2 lines of python in the QGIS python console. It will set
> all your selected layers to 50% opacity.
>
>
> for layer in iface.layerTreeView().selectedLayers():
>     layer.setOpacity(.5)
>
>
> I think the stroke style is harder to change because all these layers
> can have different symbologies.
>
> Hope it helps!
> Raymond
>
>
> On 01-04-2022 09:47, Roland Spielhofer via Qgis-user wrote:
>> Hi,
>> I have a set of similar layers where I would like to change certain
>> properties for all layers in the same way.
>> * change opacity to 50%
>> * change stroke style to "no pen"
>> When I select multiple layers and open properties -> symbology, I
>> just change the styling of the first layer, not for all.
>> Is there a way to do this?
>> Regards,
>> Roland
>>
>> _______________________________________________
>> Qgis-user mailing list
>> [email protected]
>> List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
>> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user
> _______________________________________________
> Qgis-user mailing list
> [email protected]
> List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user
_______________________________________________
Qgis-user mailing list
[email protected]
List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user

_______________________________________________
Qgis-user mailing list
[email protected]
List info:https://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe:https://lists.osgeo.org/mailman/listinfo/qgis-user
_______________________________________________
Qgis-user mailing list
[email protected]
List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user

Reply via email to