QGraphicsDropShadowEffect#
The QGraphicsDropShadowEffect
class provides a drop shadow effect. More…
New 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
Functions#
def
blurRadius
()def
color
()def
offset
()def
xOffset
()def
yOffset
()
Slots#
def
setBlurRadius
(blurRadius)def
setColor
(color)def
setOffset
(ofs)def
setOffset
(d)def
setOffset
(dx, dy)def
setXOffset
(dx)def
setYOffset
(dy)
Signals#
def
blurRadiusChanged
(blurRadius)def
colorChanged
(color)def
offsetChanged
(offset)
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 the setOffset()
function and the blur radius of the drop shadow can be changed with the setBlurRadius()
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.
- class PySide6.QtWidgets.QGraphicsDropShadowEffect([parent=None])#
- Parameters:
parent –
PySide6.QtCore.QObject
Constructs a new QGraphicsDropShadowEffect
instance. The parent
parameter is passed to QGraphicsEffect
‘s constructor.
Note
Properties can be used directly when from __feature__ import true_property
is used or via accessor functions otherwise.
- property PᅟySide6.QtWidgets.QGraphicsDropShadowEffect.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:
blurRadius
()setBlurRadius
(blurRadius)Signal
blurRadiusChanged
(blurRadius)
- property PᅟySide6.QtWidgets.QGraphicsDropShadowEffect.color: PySide6.QtGui.QColor#
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:
color
()setColor
(color)Signal
colorChanged
(color)
- property PᅟySide6.QtWidgets.QGraphicsDropShadowEffect.offset: PySide6.QtCore.QPointF#
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:
offset
()setOffset
(ofs)Signal
offsetChanged
(offset)
- property PᅟySide6.QtWidgets.QGraphicsDropShadowEffect.xOffset: float#
This property holds the horizontal shadow offset in pixels..
By default, the horizontal shadow offset is 8 pixels.
- Access functions:
xOffset
()setXOffset
(dx)Signal
offsetChanged
(offset)
- property PᅟySide6.QtWidgets.QGraphicsDropShadowEffect.yOffset: float#
This property holds the vertical shadow offset in pixels..
By default, the vertical shadow offset is 8 pixels.
- Access functions:
yOffset
()setYOffset
(dy)Signal
offsetChanged
(offset)
- PySide6.QtWidgets.QGraphicsDropShadowEffect.blurRadius()#
- Return type:
float
See also
Getter of property blurRadius
.
- PySide6.QtWidgets.QGraphicsDropShadowEffect.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
.
- PySide6.QtWidgets.QGraphicsDropShadowEffect.color()#
- Return type:
See also
Getter of property color
.
- PySide6.QtWidgets.QGraphicsDropShadowEffect.colorChanged(color)#
- Parameters:
color –
PySide6.QtGui.QColor
This signal is emitted whenever the effect’s color changes. The color
parameter holds the effect’s new color.
Notification signal of property color
.
- PySide6.QtWidgets.QGraphicsDropShadowEffect.offset()#
- Return type:
See also
Getter of property offset
.
- PySide6.QtWidgets.QGraphicsDropShadowEffect.offsetChanged(offset)#
- Parameters:
offset –
PySide6.QtCore.QPointF
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
.
- PySide6.QtWidgets.QGraphicsDropShadowEffect.setBlurRadius(blurRadius)#
- Parameters:
blurRadius – float
See also
Setter of property blurRadius
.
- PySide6.QtWidgets.QGraphicsDropShadowEffect.setColor(color)#
- Parameters:
color –
PySide6.QtGui.QColor
See also
Setter of property color
.
- PySide6.QtWidgets.QGraphicsDropShadowEffect.setOffset(ofs)#
- Parameters:
ofs –
PySide6.QtCore.QPointF
See also
Setter of property offset
.
- PySide6.QtWidgets.QGraphicsDropShadowEffect.setOffset(d)
- Parameters:
d – float
- PySide6.QtWidgets.QGraphicsDropShadowEffect.setOffset(dx, dy)
- Parameters:
dx – float
dy – float
- PySide6.QtWidgets.QGraphicsDropShadowEffect.setXOffset(dx)#
- Parameters:
dx – float
See also
Setter of property xOffset
.
- PySide6.QtWidgets.QGraphicsDropShadowEffect.setYOffset(dy)#
- Parameters:
dy – float
See also
Setter of property yOffset
.
- PySide6.QtWidgets.QGraphicsDropShadowEffect.xOffset()#
- Return type:
float
See also
Getter of property xOffset
.
- PySide6.QtWidgets.QGraphicsDropShadowEffect.yOffset()#
- Return type:
float
See also
Getter of property yOffset
.