QGraphicsObject: handle QEvent::StyleAnimationUpdate

Change-Id: I8545d6f26e2c2398e750b0b85ba87892a2e376ae
Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
This commit is contained in:
J-P Nurmi 2012-10-15 14:23:07 +02:00 committed by The Qt Project
parent d686ad12e8
commit 932bf57ea2
2 changed files with 15 additions and 0 deletions

View File

@ -7575,6 +7575,18 @@ QGraphicsObject::QGraphicsObject(QGraphicsItemPrivate &dd, QGraphicsItem *parent
QGraphicsItem::d_ptr->isObject = true;
}
/*!
\reimp
*/
bool QGraphicsObject::event(QEvent *ev)
{
if (ev->type() == QEvent::StyleAnimationUpdate) {
update();
return true;
}
return QObject::event(ev);
}
#ifndef QT_NO_GESTURES
/*!
Subscribes the graphics object to the given \a gesture with specific \a flags.

View File

@ -594,6 +594,9 @@ Q_SIGNALS:
protected:
QGraphicsObject(QGraphicsItemPrivate &dd, QGraphicsItem *parent);
bool event(QEvent *ev);
private:
friend class QGraphicsItem;
friend class QGraphicsItemPrivate;