Class: QgsOpacityWidget

class qgis.gui.QgsOpacityWidget(parent: QWidget = None)

Bases: PyQt5.QtWidgets.QWidget

Constructor for QgsOpacityWidget.

A widget for setting an opacity value.

New in version 3.0.

Parameters

parent

actionEvent()
changeEvent()
childEvent()
closeEvent()
connectNotify()
contextMenuEvent()
create()
customEvent()
destroy()
disconnectNotify()
dragEnterEvent()
dragLeaveEvent()
dragMoveEvent()
dropEvent()
enterEvent()
event()
focusInEvent()
focusNextChild()
focusNextPrevChild()
focusOutEvent()
focusPreviousChild()
hideEvent()
initPainter()
inputMethodEvent()
isSignalConnected()
keyPressEvent()
keyReleaseEvent()
leaveEvent()
metric()
mouseDoubleClickEvent()
mouseMoveEvent()
mousePressEvent()
mouseReleaseEvent()
moveEvent()
nativeEvent()
opacity(self) → float

Returns the current opacity selected in the widget, where opacity ranges from 0.0 (transparent) to 1.0 (opaque).

See also

setOpacity()

See also

opacityChanged()

Return type

float

opacityChanged

Emitted when the opacity is changed in the widget, where opacity ranges from 0.0 (transparent) to 1.0 (opaque).

See also

setOpacity()

See also

opacity() [signal]

Parameters

opacity (float) –

paintEvent()
receivers()
resizeEvent()
sender()
senderSignalIndex()
setOpacity(self, opacity: float)

Sets the current opacity to show in the widget, where opacity ranges from 0.0 (transparent) to 1.0 (opaque).

See also

opacity()

See also

opacityChanged()

Parameters

opacity (float) –

sharedPainter()
showEvent()
tabletEvent()
timerEvent()
updateMicroFocus()
wheelEvent()