[Interest] Needed working stop/start for animated SVG

Serge K gourmand at inbox.ru
Tue Jan 10 18:55:26 CET 2017


SVG animation appeared first in Qt 4.1. I used it in Qt 5. 

Just needed stop and start timer with two methods. WHY THIS WAS NOT DONE BEFORE??? IN FIRST 4.1 RELEASE? :-(((

>Вторник, 10 января 2017, 20:41 +03:00 от Konstantin Tokarev <annulen at yandex.ru>:
>
>
>
>10.01.2017, 20:37, "Serge K via Interest" < interest at qt-project.org >:
>> I created widget with animated SVG for my projects. It starts after loading if signal svg->repaintNeeded() is connected to update() of my widget. To stop and restart it I found a hack - disconnect this signal and reload SVG image. In Windows and Linux this stops animation. Stupid but working. But now I use this widget for project on Andriod (using QML is not the way, QML is too weak and lame for me). But I cannot stop SVG animation on Android. It runs always. It does not depend from any connections, framerate, reloading, so on. Of course I can use another hack - to stop animation I can load non-animated image and to start I can load animated again.
>>
>> BUT... This looks too much "micro$oftish" and stupid. NOT A Qt WAY. And with this hack animation won't stop in it's "current" position - it will always start from beginning. I do not need this.
>>
>> Of course I could patch Qt code and rewrite QSvgRenderer class. I could add start() and stop() functions to control internal d->timer - it emits ticks for animation frames. BUT WHY THIS WAS NOT DONE BEFORE??? :-(((
>
>Because you haven't done it
>
>>
>> --
>> Serge K ,
>>
>> _______________________________________________
>> Interest mailing list
>>  Interest at qt-project.org
>>  http://lists.qt-project.org/mailman/listinfo/interest
>
>
>-- 
>Regards,
>Konstantin

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20170110/9a8be8ff/attachment.html>


More information about the Interest mailing list