|  | Home · All Classes · Modules

# QGraphicsDropShadowEffect Class Reference
[QtGui module]

The QGraphicsDropShadowEffect class provides a drop shadow effect. More...

Inherits QGraphicsEffect.

### Methods

- __init__ (self, QObject parent = None)
- float blurRadius (self)
- QRectF boundingRectFor (self, QRectF)
- QColor color (self)
- draw (self, QPainter)
- QPointF offset (self)
- setBlurRadius (self, float)
- setColor (self, QColor)
- setOffset (self, QPointF)
- setOffset (self, float, float)
- setOffset (self, float)
- setXOffset (self, float)
- setYOffset (self, float)
- float xOffset (self)
- float yOffset (self)

### Qt Signals

- void blurRadiusChanged (qreal)
- void colorChanged (const QColor&)
- void offsetChanged (const QPointF&)

## Detailed Description

The QGraphicsDropShadowEffect class provides a drop shadow effect.

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 the setOffset() function and the blur radius of the drop shadow can be changed with the setBlurRadius() 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.

See also QGraphicsBlurEffect, QGraphicsColorizeEffect, and QGraphicsOpacityEffect.

## Method Documentation

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

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

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

### float QGraphicsDropShadowEffect.blurRadius (self)

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

Reimplemented from QGraphicsEffect.boundingRectFor().

### QColor QGraphicsDropShadowEffect.color (self)

### QGraphicsDropShadowEffect.draw (self, QPainter)

Reimplemented from QGraphicsEffect.draw().

### QPointF QGraphicsDropShadowEffect.offset (self)

### QGraphicsDropShadowEffect.setBlurRadius (self, float)

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

### QGraphicsDropShadowEffect.setColor (self, QColor)

This method is also a Qt slot with the C++ signature `void setColor(const QColor&)`.

### QGraphicsDropShadowEffect.setOffset (self, QPointF)

This method is also a Qt slot with the C++ signature `void setOffset(const QPointF&)`.

### QGraphicsDropShadowEffect.setOffset (self, float, float)

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

### QGraphicsDropShadowEffect.setOffset (self, float)

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

### QGraphicsDropShadowEffect.setXOffset (self, float)

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

### QGraphicsDropShadowEffect.setYOffset (self, float)

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

### float QGraphicsDropShadowEffect.xOffset (self)

### float QGraphicsDropShadowEffect.yOffset (self)

## Qt Signal Documentation

### void blurRadiusChanged (qreal)

This is the default overload of this signal.

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

### void colorChanged (const QColor&)

This is the default overload of this signal.

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

### void offsetChanged (const QPointF&)

This is the default overload of this signal.

This signal is emitted whenever the effect's shadow offset changes. The offset parameter holds the effect's new shadow offset.