Can I extend the QPropertyAnimation refresh interval for ultra-smooth animation?

The new animation platform in Qt 4.6+ is based on QTimeLine, which has the public function void setUpdateInterval (int interval). Based on QTimeLine, QGraphicsItemAnimation can access this function, but new animation framework classes (like QPropertyAnimation) cannot! Is the animation frame blocked up to about 60 updates per second, which corresponds to a pixel-to-pixel transition of 60 pixels per screen per second (for the animation property of the QPropertyAnimation position) or is there a way to increase this without overriding everything?

+3
source share
2 answers

, , , OS/Qt . Qt Main Loop .

, , , , . , , . , , 60 .

, .

Qt , , , , , Qt 5, , .

, , , , . video, . Qt , , .

0

Qt 4.8:

// You need qt source code to access QUnifiedTimer for QAnimationDriver
// Alternatively, copy'n'paste only the declaration for QUnifiedTimer class.
#include <qt/src/corelib/animation/qabstractanimation_p.h>

...

// In the animation thread, set the update timing interval.
// The smaller the interval, the more updates and more CPU consumption.
int animationTimingInterval = update_interval_in_msecs_u_want;
QUnifiedTimer::instance()->setTimingInterval(animationTimingInterval);
0

Source: https://habr.com/ru/post/1757030/


All Articles