[Qgis-developer] How to set Vector layer transparency with pyQgis ?
Ujaval
ujaval at gmail.com
Tue Dec 3 05:31:11 PST 2013
How about this?
layer = iface.mapCanvas().currentLayer()
layer.setLayerTransparency(50) # int between 0 and 100
iface.mapCanvas().refresh()
I don't have a 1.8 version handy, but I think layer.setTransparency() would
work with the old API.
-Ujaval
On Tue, Dec 3, 2013 at 4:55 PM, Geo DrinX <geodrinx at gmail.com> wrote:
> Hello all,
>
> ... as in object, I need to set the transparency of all the vector layers
> in my plugin ( "rasparenza" ).
>
> What is the syntax to set the transparency of a vector layer (in pyQis 1.8
> and 2.0 versions ) ?
>
> I am searching in documentation and in "gis.stackexchange", but I only
> found... myself.
>
>
> Thank you in advance for any info
>
> Roberto
>
> _______________________________________________
> Qgis-developer mailing list
> Qgis-developer at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/qgis-developer
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-developer/attachments/20131203/5945243d/attachment.html>
More information about the Qgis-developer
mailing list