Qt QML Canvas RequestPaint Does Not Repaint Immediately The Scene
I'm trying to adapt the Html JS library Char.js to QML QtQuick 2.4. The library have a function to animate the scene. Everything works great if I don't animate it (eg animate with
Solution 1:
This is more or less as I would expect. requestPaint
is not an immediate operation, it's a request to repaint at a later point. So if you call requestPaint
multiple times in a single JS function, you will only receive one onPaint
event per (vsync) frame.
So if you want to drive an animation, you should be driving them inside onPaint, by calling requestPaint (to ask for another onPaint event in the future) if there is still more animation to show for instance.
Post a Comment for "Qt QML Canvas RequestPaint Does Not Repaint Immediately The Scene"