Class: QgsRasterTransparencyWidget¶
A widget for controlling a raster layer’s transparency and related options.

QgsRasterTransparencyWidget¶
Class Hierarchy¶
Base classes¶
A panel widget that can be shown in the map style dock. |
|
Base class for any widget that can be shown as an inline panel. |
|
Abstract Methods
Apply any changes on the widget to the set layer. |
Methods
Returns the (possibly None) map pixel selector tool. |
|
Sets the context in which the dialog is shown, e.g., the associated map canvas and expression contexts. |
Virtual Methods
In PyQGIS, only methods marked as virtual
can be safely overridden in a Python subclass of QgsRasterTransparencyWidget. See the FAQ for more details.
Sync the widget state to the layer set for the widget. |
- class qgis.gui.QgsRasterTransparencyWidget[source]¶
Bases:
QgsMapLayerConfigWidget
- __init__(layer: QgsRasterLayer | None, canvas: QgsMapCanvas | None, parent: QWidget | None = None)
Widget to control a layers transparency and related options
- Parameters:
layer (Optional[QgsRasterLayer])
canvas (Optional[QgsMapCanvas])
parent (Optional[QWidget] = None)
- virtual createExpressionContext(self) QgsExpressionContext [source]¶
- Return type:
- pixelSelectorTool(self) QgsMapToolEmitPoint | None [source]¶
Returns the (possibly None) map pixel selector tool.
Added in version 3.22.
- Return type:
Optional[QgsMapToolEmitPoint]
- setContext(self, context: QgsSymbolWidgetContext)[source]¶
Sets the
context
in which the dialog is shown, e.g., the associated map canvas and expression contexts.Added in version 3.22.
- Parameters:
context (QgsSymbolWidgetContext)