[Qgis-user] Change properties of multiple layer at once
C Hamilton
adenaculture at gmail.com
Mon Apr 4 09:38:27 PDT 2022
I have been working on a plugin and as a part of its capabilities is to be
able to use a .qml file or the style on the clipboard to apply it to all
selected layers including groups of layers. It would be a very similar
process to adjust the opacity or stroke style.
On Fri, Apr 1, 2022 at 6:04 AM Roland Spielhofer via Qgis-user <
qgis-user at lists.osgeo.org> wrote:
> 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" <qgis-user at lists.osgeo.org>
> *An:* "Raymond Nijssen" <r.nijssen at terglobo.nl>, qgis-user at lists.osgeo.org
> *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
> >> Qgis-user at lists.osgeo.org
> >> List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
> >> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user
> > _______________________________________________
> > Qgis-user mailing list
> > Qgis-user at lists.osgeo.org
> > List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
> > Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user
> _______________________________________________
> Qgis-user mailing list
> Qgis-user at lists.osgeo.org
> List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user
> _______________________________________________
> Qgis-user mailing list
> Qgis-user at lists.osgeo.org
> List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-user/attachments/20220404/805319e7/attachment.html>
More information about the Qgis-user
mailing list