QGraphicsDropShadowEffect¶
The
QGraphicsDropShadowEffect
class provides a drop shadow effect. More…
New in version 4.6.
Synopsis¶
Functions¶
def
blurRadius
()def
color
()def
offset
()def
xOffset
()def
yOffset
()
Slots¶
def
setBlurRadius
(blurRadius)def
setColor
(color)def
setOffset
(d)def
setOffset
(dx, dy)def
setOffset
(ofs)def
setXOffset
(dx)def
setYOffset
(dy)
Signals¶
def
blurRadiusChanged
(blurRadius)def
colorChanged
(color)def
offsetChanged
(offset)
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.
- class PySide2.QtWidgets.QGraphicsDropShadowEffect([parent=None])¶
- param parent:
Constructs a new
QGraphicsDropShadowEffect
instance. Theparent
parameter is passed toQGraphicsEffect
‘s constructor.
- PySide2.QtWidgets.QGraphicsDropShadowEffect.blurRadius()¶
- Return type:
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.
- PySide2.QtWidgets.QGraphicsDropShadowEffect.blurRadiusChanged(blurRadius)¶
- Parameters:
blurRadius – float
- PySide2.QtWidgets.QGraphicsDropShadowEffect.color()¶
- Return type:
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
- PySide2.QtWidgets.QGraphicsDropShadowEffect.colorChanged(color)¶
- Parameters:
color –
PySide2.QtGui.QColor
- PySide2.QtWidgets.QGraphicsDropShadowEffect.offset()¶
- Return type:
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
- PySide2.QtWidgets.QGraphicsDropShadowEffect.offsetChanged(offset)¶
- Parameters:
offset –
PySide2.QtCore.QPointF
- PySide2.QtWidgets.QGraphicsDropShadowEffect.setBlurRadius(blurRadius)¶
- Parameters:
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.
- PySide2.QtWidgets.QGraphicsDropShadowEffect.setColor(color)¶
- Parameters:
color –
PySide2.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
- PySide2.QtWidgets.QGraphicsDropShadowEffect.setOffset(ofs)¶
- Parameters:
ofs –
PySide2.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
- PySide2.QtWidgets.QGraphicsDropShadowEffect.setOffset(d)
- Parameters:
d – float
- PySide2.QtWidgets.QGraphicsDropShadowEffect.setOffset(dx, dy)
- Parameters:
dx – float
dy – float
- PySide2.QtWidgets.QGraphicsDropShadowEffect.setXOffset(dx)¶
- Parameters:
dx – float
This property holds the horizontal shadow offset in pixels..
By default, the horizontal shadow offset is 8 pixels.
- PySide2.QtWidgets.QGraphicsDropShadowEffect.setYOffset(dy)¶
- Parameters:
dy – float
This property holds the vertical shadow offset in pixels..
By default, the vertical shadow offset is 8 pixels.
- PySide2.QtWidgets.QGraphicsDropShadowEffect.xOffset()¶
- Return type:
float
This property holds the horizontal shadow offset in pixels..
By default, the horizontal shadow offset is 8 pixels.
- PySide2.QtWidgets.QGraphicsDropShadowEffect.yOffset()¶
- Return type:
float
This property holds the vertical shadow offset in pixels..
By default, the vertical shadow offset is 8 pixels.
© 2022 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.