QtAwesome icon indicating copy to clipboard operation
QtAwesome copied to clipboard

Support for animation

Open lancevalour opened this issue 10 years ago • 6 comments

Is there any way to make spinner spin? Font Awesome has the option to make icon animated. Thanks.

lancevalour avatar Nov 18 '15 15:11 lancevalour

I really would like to support this. Problem is that as far as I know, updating a QIcon is simply by replacing it with another icon... So the animation support should happen on the control and not on the icon.

So I don't know how exactly how to fit it in this library :S

See this example: http://stackoverflow.com/questions/15374191/how-to-set-animated-icon-to-qpushbutton-in-qt5

gamecreature avatar Nov 18 '15 18:11 gamecreature

@gamecreature we have some support for animation in the python port. You might be interested to check it out. S.

SylvainCorlay avatar Nov 18 '15 19:11 SylvainCorlay

Thanks @SylvainCorlay Nice solution.. I will check it out when I've got some time. Need to see how to fit this nicely in c++ ... Python is very dynamic language ;)

gamecreature avatar Nov 19 '15 07:11 gamecreature

I've implemented the basics for animation. Unfortunately I Accidentally committed it to the master and pushed it :S. I've meant to implement this in a separate branch, to work out the interface.. The animation now works.. I still need to fix the following issues:

  • Memory management to cleanup animation objects when destroying the icon/widget
  • nicer interface the adding it to a qvariant map
  • make 2 examples, one with animation and one without

gamecreature avatar Dec 08 '15 06:12 gamecreature

:+1:

SylvainCorlay avatar Dec 08 '15 06:12 SylvainCorlay

Awesome!

2015年12月8日星期二,Sylvain Corlay [email protected] 写道:

[image: :+1:]

— Reply to this email directly or view it on GitHub https://github.com/gamecreature/QtAwesome/issues/12#issuecomment-162785049 .

lancevalour avatar Dec 08 '15 06:12 lancevalour