[Qt-jambi-interest] Restart SVG Animation

Dimitri Frederickx info at dimitrifrederickx.be
Mon Aug 11 23:20:52 CEST 2008


When i call setCurrentFrame(0), the animation is indeed set to the start, 
but it is stopped. How do I start the animation back?

/Dimitri




Gunnar Sletta <gunnar at trolltech.com> wrote:
 
> Dimitri Frederickx wrote:
>> Hi,
>> 
>> I'm creating a QGraphicsSvgItem to display an svg file with 
>> animations. When I open the item, the animation automatically starts.
>> 
>> Is there a way to stop the animation and start it back? And is there a 
>> method for resetting the animation (to the first frame)?
> 
> Hi Dimitri,
> 
> You can access the item's svg renderer using 
> QGraphicsSvgItem::renderer(). Using the renderer you can 
> setCurrentFrame() which should give you what you want.
> 
> best regards,
> Gunnar
> 




More information about the Qt-jambi-interest mailing list