QGraphicsOpacityEffect Class Reference

[ QtGui module]

QGraphicsOpacityEffect 类提供不透明度效果。 更多...

继承 QGraphicsEffect .

方法

Qt Signals


详细描述

QGraphicsOpacityEffect 类提供不透明度效果。

An opacity effect renders the source with an opacity. This effect is useful for making the source semi-transparent, similar to a fade-in/fade-out sequence. The opacity can be modified using the setOpacity () 函数。

默认情况下,不透明度是 0.7。


方法文档编制

QGraphicsOpacityEffect.__init__ ( self , QObject   parent  = None)

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

构造新 QGraphicsOpacityEffect 实例。 parent 参数会被传递给 QGraphicsEffect 的构造函数。

QGraphicsOpacityEffect.draw ( self , QPainter   painter )

重实现自 QGraphicsEffect.draw ().

float QGraphicsOpacityEffect.opacity ( self )

QBrush QGraphicsOpacityEffect.opacityMask ( self )

QGraphicsOpacityEffect.setOpacity ( self , float  opacity )

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

QGraphicsOpacityEffect.setOpacityMask ( self , QBrush   mask )

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


Qt Signal Documentation

void opacityChanged (qreal)

This is the default overload of this signal.

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

void opacityMaskChanged (const QBrush&)

This is the default overload of this signal.

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