[Interest] How to make a looping element?

Ola Røer Thorsen ola at silentwings.no
Mon Jan 29 19:23:59 CET 2018


Try the RotationAnimation item and set the direction property to shortest.
http://doc.qt.io/qt-5/qml-qtquick-rotationanimation.html

Cheers, 
Ola


> Den 29. jan. 2018 kl. 02.15 skrev Jason H <jhihn at gmx.com>:
> 
> I am trying to make a compass control, something that shows 0-360, like a boat compass. It's got hash marks and numbers 350...0...10, etc. I have something that largely works, but when the position crosses over 360 to 0, the whole thing swings back around. It's very jerky, so I animate it, and it's got that nice smoothness. I've tried to use complete() to make the animation finish when it's a switch over, no luck.
> 
> Does anyone have tips on how I can do this?
> _______________________________________________
> Interest mailing list
> Interest at qt-project.org
> http://lists.qt-project.org/mailman/listinfo/interest
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20180129/f349e01b/attachment.html>


More information about the Interest mailing list