mirror of
https://github.com/gamecreature/QtAwesome.git
synced 2024-11-15 13:35:44 +08:00
Support for animation (#25)
ref #23, Metatype for QtAwesomeAnimation* Qt4.8.6
This commit is contained in:
parent
83b369bdb1
commit
dfaaa0f60a
@ -28,8 +28,8 @@ public:
|
||||
|
||||
painter->save();
|
||||
|
||||
QObject* qanim = qvariant_cast<QObject*>(options.value("anim"));
|
||||
QtAwesomeAnimation* anim = qobject_cast<QtAwesomeAnimation*>(qanim);
|
||||
QVariant var =options.value("anim");
|
||||
QtAwesomeAnimation* anim = var.value<QtAwesomeAnimation*>();
|
||||
if( anim ) {
|
||||
anim->setup( *painter, rect );
|
||||
}
|
||||
|
@ -871,6 +871,6 @@ public:
|
||||
virtual void paint( QtAwesome* awesome, QPainter* painter, const QRect& rect, QIcon::Mode mode, QIcon::State state, const QVariantMap& options ) = 0;
|
||||
};
|
||||
|
||||
|
||||
Q_DECLARE_METATYPE(QtAwesomeAnimation*)
|
||||
|
||||
#endif // QTAWESOME_H
|
||||
|
Loading…
Reference in New Issue
Block a user