Messing around to try to get our animation to start and stop properly.
That's still not working though.
2 import QtQuick.Controls 1.2
6 height: scrollingText.height
9 property int pixelsPerSeconds:25
10 property alias text: scrollingText.text
11 property alias separator: separatorText.text
15 antialiasing: item.antialiasing
21 x:scrollingText.x+scrollingText.width
22 antialiasing: item.antialiasing
27 text:scrollingText.text
28 x:scrollingText.x+scrollingText.width+separatorText.width
29 antialiasing: item.antialiasing
34 loops: Animation.Infinite;
35 //Reset to zero and restart onStopped so that we keep looping
36 //onStopped: {scrollingText.x=0;running=true;}
38 property int lengthInPixels:scrollingText.width-separatorText.width-scrollingText.x;
39 property int durationInMs:(animation.lengthInPixels)*1000/pixelsPerSeconds;
42 target: scrollingText;
44 from: scrollingText.x;
45 to: scrollingText.x-animation.lengthInPixels;
46 duration:animation.durationInMs
50 target: separatorText;
52 from: separatorText.x;
53 to: separatorText.x-animation.lengthInPixels;
54 duration: animation.durationInMs
58 target: followingText;
60 from: followingText.x;
61 to: followingText.x-animation.lengthInPixels;
62 duration: animation.durationInMs
71 onClicked: {animation.running=!animation.running;
73 if (!animation.running) {