Rotation of an image (in a loop) is not smooth although the fps is 60



  • I tried two different possibilities.

    First:

    @Image
    {
    id: media_cover
    source: "../images/media_cover.png"
    smooth: true
    rotation: 0
    transformOrigin: Item.Center
    }@

    @RotationAnimation
    {
    target: media_cover;
    property: "rotation";
    loops: Animation.Infinite;
    from: 0;
    to: 360;
    duration: 8000
    } @

    Second:

    @ Image
    {
    id: media_cover
    source: "../images/media_cover.png"
    smooth: true

            transform:
                Rotation {
                id: cover_rot
                origin.x: parent.width/2
                origin.y: parent.width/2
                angle: 0
                }
    

    }
    @

    @NumberAnimation
    {
    target: cover_rot;
    property: "angle";
    loops: Animation.Infinite;
    from: 0;
    to: 360;
    duration: 8000
    }
    @

    Both options don't work.

    I tried it on windows xp, windows 7, i.MX53 with Qt 4.8 and also with Qt 5 Alpha. Everywhere with the same result.

    Is it a known problem of Qt or rather someone knows a solution for this problem.


  • Moderators

    AFAIK, it is a known problem, it was discussed a while ago on dev mailing list. Try porting to QtQuick2 if possible, just to see if it is still a problem there. On the other hand, animations are not smooth with QML2 on Linux... but maybe that was fixed, too.



  • The perceived smoothness has to do with synchronization of the renderings with the updates of the screen by the underlying system (OpenGL, for instance). At least, that is how I understood the issue. See "this post":http://labs.qt.nokia.com/2010/12/02/velvet-and-the-qml-scene-graph/ for example.



  • Thank You for your answers, I forget to say that i tried it with QtQuick 2.0, too. There is the same Problem.


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.