Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. Rotation of an image (in a loop) is not smooth although the fps is 60
Forum Updated to NodeBB v4.3 + New Features

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

Scheduled Pinned Locked Moved QML and Qt Quick
4 Posts 2 Posters 2.7k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • ? This user is from outside of this forum
    ? This user is from outside of this forum
    Guest
    wrote on last edited by
    #1

    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.

    1 Reply Last reply
    0
    • sierdzioS Offline
      sierdzioS Offline
      sierdzio
      Moderators
      wrote on last edited by
      #2

      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.

      (Z(:^

      1 Reply Last reply
      0
      • A Offline
        A Offline
        andre
        wrote on last edited by
        #3

        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.

        1 Reply Last reply
        0
        • ? This user is from outside of this forum
          ? This user is from outside of this forum
          Guest
          wrote on last edited by
          #4

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

          1 Reply Last reply
          0

          • Login

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • Users
          • Groups
          • Search
          • Get Qt Extensions
          • Unsolved