[Interest] Needed working stop/start for animated SVG

Serge K gourmand at inbox.ru
Tue Jan 10 18:37:20 CET 2017


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??? :-(((

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


More information about the Interest mailing list