QGraphicsDropShadowEffect Class Reference

[ QtGui module]

The QGraphicsDropShadowEffect class provides a drop shadow 效果。 更多...

继承 QGraphicsEffect .

方法

Qt Signals


详细描述

The QGraphicsDropShadowEffect class provides a drop shadow 效果。

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 () 函数。

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. The drop shadow offset is specified in device coordinates.


方法文档编制

QGraphicsDropShadowEffect.__init__ ( self , QObject   parent  = None)

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

构造新 QGraphicsDropShadowEffect instance. The parent 参数会被传递给 QGraphicsEffect 的构造函数。

float QGraphicsDropShadowEffect.blurRadius ( self )

QRectF QGraphicsDropShadowEffect.boundingRectFor ( self , QRectF   rect )

重实现自 QGraphicsEffect.boundingRectFor ().

QColor QGraphicsDropShadowEffect.color ( self )

QGraphicsDropShadowEffect.draw ( self , QPainter   painter )

重实现自 QGraphicsEffect.draw ().

QPointF QGraphicsDropShadowEffect.offset ( self )

QGraphicsDropShadowEffect.setBlurRadius ( self , float  blurRadius )

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

QGraphicsDropShadowEffect.setColor ( self , QColor   color )

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

QGraphicsDropShadowEffect.setOffset ( self , QPointF   ofs )

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

QGraphicsDropShadowEffect.setOffset ( self , float  dx , float  dy )

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

QGraphicsDropShadowEffect.setOffset ( self , float  d )

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

QGraphicsDropShadowEffect.setXOffset ( self , float  dx )

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

QGraphicsDropShadowEffect.setYOffset ( self , float  dy )

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 改变。 blurRadius parameter holds the effect's new blur radius.

void colorChanged (const QColor&)

This is the default overload of this signal.

此信号被发射,每当效果的颜色改变时。 color 参数保持效果的新颜色。

void offsetChanged (const QPointF&)

This is the default overload of this signal.

This signal is emitted whenever the effect's shadow offset 改变。 offset parameter holds the effect's new shadow offset.