QGraphicsBlurEffect¶
The
QGraphicsBlurEffect
class provides a blur effect. More…
New in version 4.6.
Synopsis¶
Functions¶
def
blurHints
()def
blurRadius
()
Slots¶
def
setBlurHints
(hints)def
setBlurRadius
(blurRadius)
Signals¶
def
blurHintsChanged
(hints)def
blurRadiusChanged
(blurRadius)
Detailed Description¶
A blur effect blurs the source. This effect is useful for reducing details, such as when the source loses focus and you want to draw attention to other elements. The level of detail can be modified using the
setBlurRadius()
function. UsesetBlurHints()
to choose the blur hints.By default, the blur radius is 5 pixels. The blur radius is specified in device coordinates.
- class PySide2.QtWidgets.QGraphicsBlurEffect([parent=None])¶
- param parent:
Constructs a new
QGraphicsBlurEffect
instance. Theparent
parameter is passed toQGraphicsEffect
‘s constructor.
- PySide2.QtWidgets.QGraphicsBlurEffect.BlurHint¶
This enum describes the possible hints that can be used to control how blur effects are applied. The hints might not have an effect in all the paint engines.
Constant
Description
QGraphicsBlurEffect.PerformanceHint
Indicates that rendering performance is the most important factor, at the potential cost of lower quality.
QGraphicsBlurEffect.QualityHint
Indicates that rendering quality is the most important factor, at the potential cost of lower performance.
QGraphicsBlurEffect.AnimationHint
Indicates that the blur radius is going to be animated, hinting that the implementation can keep a cache of blurred versions of the source. Do not use this hint if the source is going to be dynamically changing.
See also
- PySide2.QtWidgets.QGraphicsBlurEffect.blurHints()¶
- Return type:
BlurHints
This property holds the blur hint of the effect..
Use the
PerformanceHint
hint to say that you want a faster blur, theQualityHint
hint to say that you prefer a higher quality blur, or theAnimationHint
when you want to animate the blur radius.By default, the blur hint is
PerformanceHint
.
- PySide2.QtWidgets.QGraphicsBlurEffect.blurHintsChanged(hints)¶
- Parameters:
hints –
BlurHints
- PySide2.QtWidgets.QGraphicsBlurEffect.blurRadius()¶
- Return type:
float
This property holds the blur radius of the effect..
Using a smaller radius results in a sharper appearance, whereas a bigger radius results in a more blurred appearance.
By default, the blur radius is 5 pixels.
The radius is given in device coordinates, meaning it is unaffected by scale.
- PySide2.QtWidgets.QGraphicsBlurEffect.blurRadiusChanged(blurRadius)¶
- Parameters:
blurRadius – float
- PySide2.QtWidgets.QGraphicsBlurEffect.setBlurHints(hints)¶
- Parameters:
hints –
BlurHints
This property holds the blur hint of the effect..
Use the
PerformanceHint
hint to say that you want a faster blur, theQualityHint
hint to say that you prefer a higher quality blur, or theAnimationHint
when you want to animate the blur radius.By default, the blur hint is
PerformanceHint
.
- PySide2.QtWidgets.QGraphicsBlurEffect.setBlurRadius(blurRadius)¶
- Parameters:
blurRadius – float
This property holds the blur radius of the effect..
Using a smaller radius results in a sharper appearance, whereas a bigger radius results in a more blurred appearance.
By default, the blur radius is 5 pixels.
The radius is given in device coordinates, meaning it is unaffected by scale.
© 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.