QGraphicsBlurEffect Class Reference

The QGraphicsBlurEffect class provides a blur effect.

  1. #include <QGraphicsBlurEffect>

Inherits: QGraphicsEffect.

This class was introduced in Qt 4.6.

Detailed Description

The 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.

Public Types

Toggle detailsenum QGraphicsBlurEffect::

BlurHintBlurHint { PerformanceHint , QualityHint , AnimationHint 0x02 ...} { PerformanceHint , QualityHint , AnimationHint 0x02 }

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.

ConstantValueDescription
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.

See also blurHints() and setBlurHints().

Look up this member in the source code.

    Properties

    Toggle detailsblurHintsblurHints : BlurHints

    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:

    Look up this member in the source code.

    Toggle detailsblurRadiusblurRadius : qreal

    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:

    Look up this member in the source code.

      Public Functions

      Toggle details QGraphicsBlurEffect

      QGraphicsBlurEffectQGraphicsBlurEffect ( QObject *parent=0 ) ( QObject *parent=0 )

      Constructs a new QGraphicsBlurEffect instance. The parent parameter is passed to QGraphicsEffect's constructor.

      Look up this member in the source code.

      Toggle details QGraphicsBlurEffect

      ~QGraphicsBlurEffect~QGraphicsBlurEffect () ()

      Destroys the effect.

      Look up this member in the source code.

      Toggle details QRectF QGraphicsBlurEffect

      boundingRectForboundingRectFor ( const QRectF &rect ) ( const QRectF &rect )const [virtual]

      Reimplemented from QGraphicsEffect::boundingRectFor().

      Look up this member in the source code.

      Toggle details void QGraphicsBlurEffect

      drawdraw ( QPainter *painter ) ( QPainter *painter ) [virtual protected]

      Reimplemented from QGraphicsEffect::draw().

      Look up this member in the source code.

        Signals

        Toggle details void QGraphicsBlurEffect

        blurHintsChangedblurHintsChanged ( BlurHints hints ) ( BlurHints hints ) [signal]

        This signal is emitted whenever the effect's blur hints changes. The hints parameter holds the effect's new blur hints.

        Look up this member in the source code.

        Toggle details void QGraphicsBlurEffect

        blurRadiusChangedblurRadiusChanged ( qreal radius ) ( qreal radius ) [signal]

        This signal is emitted whenever the effect's blur radius changes. The radius parameter holds the effect's new blur radius.

        Look up this member in the source code.

          Notes provided by the Qt Community

          No notes