QGraphicsBlurEffect Class ReferenceThe QGraphicsBlurEffect class provides a blur effect. More... #include <QGraphicsBlurEffect> Inherits: QGraphicsEffect. This class was introduced in Qt 4.6. Public Types
Properties
Public Functions
Reimplemented Public Functions
Public Slots
Signals
Reimplemented Protected Functions
Additional Inherited Members
Detailed DescriptionThe QGraphicsBlurEffect class provides a blur effect. 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. Use setBlurHints() to choose the blur hints. By default, the blur radius is 5 pixels. The blur radius is specified in device coordinates. See also QGraphicsDropShadowEffect, QGraphicsColorizeEffect, and QGraphicsOpacityEffect. Member Type Documentation
flags QGraphicsBlurEffect::BlurHints |
Constant | Value | Description |
---|---|---|
QGraphicsBlurEffect::PerformanceHint | 0x00 | Indicates that rendering performance is the most important factor, at the potential cost of lower quality. |
QGraphicsBlurEffect::QualityHint | 0x01 | Indicates that rendering quality is the most important factor, at the potential cost of lower performance. |
QGraphicsBlurEffect::AnimationHint | 0x02 | Indicates that the blur radius is going to be animated, hinting that the implementation can keep a cache of blurred verisons of the source. Do not use this hint if the source is going to be dynamically changing. |
This enum was introduced or modified in Qt 4.6.
The BlurHints type is a typedef for QFlags<BlurHint>. It stores an OR combination of BlurHint values.
See also blurHints() and setBlurHints().
This property holds the blur hint of the effect.
Use the PerformanceHint hint to say that you want a faster blur, the QualityHint hint to say that you prefer a higher quality blur, or the AnimationHint when you want to animate the blur radius.
By default, the blur hint is PerformanceHint.
Access functions:
BlurHints | blurHints () const |
void | setBlurHints ( BlurHints hints ) |
Notifier signal:
void | blurHintsChanged ( BlurHints hints ) |
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.
Access functions:
qreal | blurRadius () const |
void | setBlurRadius ( qreal blurRadius ) |
Notifier signal:
void | blurRadiusChanged ( qreal radius ) |
Constructs a new QGraphicsBlurEffect instance. The parent parameter is passed to QGraphicsEffect's constructor.
Destroys the effect.
This signal is emitted whenever the effect's blur hints changes. The hints parameter holds the effect's new blur hints.
This signal is emitted whenever the effect's blur radius changes. The radius parameter holds the effect's new blur radius.
Reimplemented from QGraphicsEffect::boundingRectFor().
Reimplemented from QGraphicsEffect::draw().