[Interest] Needed working stop/start for animated SVG
annulen at yandex.ru
Tue Jan 10 18:41:39 CET 2017
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
More information about the Interest