7

Is there a shortcut key to increase or decrease layer transparency, or to add the opacity slider to a layer in QGIS?

I couldn't find one in the existing shortcut key list and I tried loading the transparency file to that list, but it doesn't like the format.

A while back I noticed there Python script that can do something similar, add transparency to new layers imported into the workspace, but I am looking for a simpler tool.

Kadir Şahbaz
  • 76,800
  • 56
  • 247
  • 389

2 Answers2

6

This is more a workaround but still can be useful:

Transparency/Opacity can be a tailored globally (all layers etc.) or individually by layer.

This way is by layer:

Layer Styling [Shortcut] is F7 in QGIS.

This can be docked in QGIS for quick access. This then allows the user to pick the slider for any of the layers in the canvas including images/raster's.

This screenshot shows where layer styling is available [or use F7 on the keyboard to bring it up or remove the panel] enter image description here

Windows 10 Pro (QGIS 3.14 used here)

Mapperz
  • 49,701
  • 9
  • 73
  • 132
  • OK, thank you.Looks like this is the way to go for now. – Nigel Cantwell Oct 10 '20 at 13:27
  • I see that v3.16 now has increase and decrease as an option in the keyboard shortcuts, which is very nice. However, I think I can only get it working by first clicking on the opacity slider first, and then it increments by 1%, so it's still a bit slow. I love this program and am just being a pain. I must learn how to create a plug-in. – Nigel Cantwell Mar 27 '21 at 14:30
  • @NigelCantwell where do you see this option in the keyboard shortcuts? If it was there it would solve this problem, but it's not... – 15Step Apr 08 '21 at 08:14
  • I just found it by searching transparency in keyboard shortcuts, and it's really nice to have. It is a solution to the problem, but it only increments by 1%, so still a bit slow. – Nigel Cantwell Apr 09 '21 at 09:19
6

Credits to @Kazuhito from his answer https://gis.stackexchange.com/a/284797/99589

Try the "Opacity slider" via RMC > Properties > Legend > Embedded Widgets in Legend > Available widgets

Opacity slider

and edit the transparency

result

Taras
  • 32,823
  • 4
  • 66
  • 137