Qt 6.11 is out! See what's new in the release
blog
Extend QML AnimatedImage in cpp? Or use a model?
-
Im building myself a little weather app in qml. I have currently an animated radar image, however it has poor performance in my app, causing the scroll to stutter.
Source code on github:
https://github.com/bit-shift-io/qweather/blob/master/src/radarimage.h
https://github.com/bit-shift-io/qweather/blob/master/src/radarimage.cppI'm rendering a small new image in the paint() function every 300ms.
I am not yet caching the rendered images as I'm not sure this will improve performance over another method.
Is there a better way to go about doing this such as extending AnimatedImage, or somehow using a model with animated image, or adding threading?