PySide6.QtWidgets.QGraphicsDropShadowEffect¶
- class QGraphicsDropShadowEffect¶
The
QGraphicsDropShadowEffect
class provides a drop shadow effect. More…Added in version 4.6.
Synopsis¶
Properties¶
blurRadiusᅟ
- The blur radius in pixels of the drop shadowcolorᅟ
- The color of the drop shadowoffsetᅟ
- The shadow offset in pixelsxOffsetᅟ
- The horizontal shadow offset in pixelsyOffsetᅟ
- The vertical shadow offset in pixels
Methods¶
def
__init__()
def
blurRadius()
def
color()
def
offset()
def
xOffset()
def
yOffset()
Slots¶
def
setBlurRadius()
def
setColor()
def
setOffset()
def
setXOffset()
def
setYOffset()
Signals¶
def
colorChanged()
def
offsetChanged()
Note
This documentation may contain snippets that were automatically translated from C++ to Python. We always welcome contributions to the snippet translation. If you see an issue with the translation, you can also let us know by creating a ticket on https:/bugreports.qt.io/projects/PYSIDE
Detailed Description¶
A drop shadow effect renders the source with a drop shadow. The color of the drop shadow can be modified using the
setColor()
function. The drop shadow offset can be modified using thesetOffset()
function and the blur radius of the drop shadow can be changed with thesetBlurRadius()
function.By default, the drop shadow is a semi-transparent dark gray (QColor(63, 63, 63, 180)) shadow, blurred with a radius of 1 at an offset of 8 pixels towards the lower right. The drop shadow offset is specified in device coordinates.
Note
Properties can be used directly when
from __feature__ import true_property
is used or via accessor functions otherwise.- property blurRadiusᅟ: float¶
This property holds the blur radius in pixels of the drop shadow..
Using a smaller radius results in a sharper shadow, whereas using a bigger radius results in a more blurred shadow.
By default, the blur radius is 1 pixel.
- Access functions:
This property holds the color of the drop shadow..
By default, the drop color is a semi-transparent dark gray (QColor(63, 63, 63, 180)).
See also
- Access functions:
Signal
colorChanged()
This property holds the shadow offset in pixels..
By default, the offset is 8 pixels towards the lower right.
The offset is given in device coordinates, which means it is unaffected by scale.
See also
- Access functions:
Signal
offsetChanged()
- property xOffsetᅟ: float¶
This property holds the horizontal shadow offset in pixels..
By default, the horizontal shadow offset is 8 pixels.
- Access functions:
Signal
offsetChanged()
- property yOffsetᅟ: float¶
This property holds the vertical shadow offset in pixels..
By default, the vertical shadow offset is 8 pixels.
- Access functions:
Signal
offsetChanged()
Constructs a new
QGraphicsDropShadowEffect
instance. Theparent
parameter is passed toQGraphicsEffect
‘s constructor.- blurRadius()¶
- Return type:
float
See also
Getter of property
blurRadiusᅟ
.- blurRadiusChanged(blurRadius)¶
- Parameters:
blurRadius – float
This signal is emitted whenever the effect’s blur radius changes. The
blurRadius
parameter holds the effect’s new blur radius.Notification signal of property
blurRadiusᅟ
.- color()¶
- Return type:
See also
Getter of property
colorᅟ
.This signal is emitted whenever the effect’s color changes. The
color
parameter holds the effect’s new color.Notification signal of property
colorᅟ
.- offset()¶
- Return type:
See also
Getter of property
offsetᅟ
.This signal is emitted whenever the effect’s shadow offset changes. The
offset
parameter holds the effect’s new shadow offset.Notification signal of property
offsetᅟ
.- setBlurRadius(blurRadius)¶
- Parameters:
blurRadius – float
See also
Setter of property
blurRadiusᅟ
.Setter of property
colorᅟ
.Setter of property
offsetᅟ
.- setOffset(d)
- Parameters:
d – float
- setOffset(dx, dy)
- Parameters:
dx – float
dy – float
Setter of property
xOffsetᅟ
.Setter of property
yOffsetᅟ
.- xOffset()¶
- Return type:
float
See also
Getter of property
xOffsetᅟ
.- yOffset()¶
- Return type:
float
See also
Getter of property
yOffsetᅟ
.