QGraphicsOpacityEffect

The QGraphicsOpacityEffect class provides an opacity effect. More

Inheritance diagram of PySide2.QtWidgets.QGraphicsOpacityEffect

New in version 4.6.

Synopsis

Functions

Slots

Signals

Detailed Description

An opacity effect renders the source with an opacity. This effect is useful for making the source semi-transparent, similar to a fade-in/fade-out sequence. The opacity can be modified using the setOpacity() function.

By default, the opacity is 0.7.

../../_images/graphicseffect-opacity.png
class QGraphicsOpacityEffect([parent=None])
param parent

QObject

Constructs a new QGraphicsOpacityEffect instance. The parent parameter is passed to QGraphicsEffect ‘s constructor.

PySide2.QtWidgets.QGraphicsOpacityEffect.opacity()
Return type

qreal

See also

setOpacity()

PySide2.QtWidgets.QGraphicsOpacityEffect.opacityChanged(opacity)
Parameters

opacityqreal

PySide2.QtWidgets.QGraphicsOpacityEffect.opacityMask()
Return type

QBrush

See also

setOpacityMask()

PySide2.QtWidgets.QGraphicsOpacityEffect.opacityMaskChanged(mask)
Parameters

maskQBrush

PySide2.QtWidgets.QGraphicsOpacityEffect.setOpacity(opacity)
Parameters

opacityqreal

See also

opacity()

PySide2.QtWidgets.QGraphicsOpacityEffect.setOpacityMask(mask)
Parameters

maskQBrush

See also

opacityMask()