|  | Home · All Classes · Modules

# QGraphicsBlurEffect Class Reference
[QtGui module]

The QGraphicsBlurEffect class provides a blur effect. More...

Inherits QGraphicsEffect.

### Types

- enum BlurHint { PerformanceHint, QualityHint, AnimationHint }
- class BlurHints

### Methods

- __init__ (self, QObject parent = None)
- BlurHints blurHints (self)
- float blurRadius (self)
- QRectF boundingRectFor (self, QRectF)
- draw (self, QPainter)
- setBlurHints (self, BlurHints)
- setBlurRadius (self, float)

### Qt Signals

- void blurHintsChanged (QGraphicsBlurEffect::BlurHints)
- void blurRadiusChanged (qreal)

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

See also QGraphicsDropShadowEffect, QGraphicsColorizeEffect, and QGraphicsOpacityEffect.

## Type Documentation

### 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 | 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 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().

## Method Documentation

### QGraphicsBlurEffect.__init__ (self, QObject parent = None)

The parent argument, if not None, causes self to be owned by Qt instead of PyQt.

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

### BlurHints QGraphicsBlurEffect.blurHints (self)

### float QGraphicsBlurEffect.blurRadius (self)

### QRectF QGraphicsBlurEffect.boundingRectFor (self, QRectF)

Reimplemented from QGraphicsEffect.boundingRectFor().

### QGraphicsBlurEffect.draw (self, QPainter)

Reimplemented from QGraphicsEffect.draw().

### QGraphicsBlurEffect.setBlurHints (self, BlurHints)

This method is also a Qt slot with the C++ signature `void setBlurHints(QGraphicsBlurEffect::BlurHints)`.

### QGraphicsBlurEffect.setBlurRadius (self, float)

This method is also a Qt slot with the C++ signature `void setBlurRadius(qreal)`.

## Qt Signal Documentation

### void blurHintsChanged (QGraphicsBlurEffect::BlurHints)

This is the default overload of this signal.

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

### void blurRadiusChanged (qreal)

This is the default overload of this signal.

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