Advertisement
Guest User

Untitled

a guest
Jul 31st, 2015
231
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.91 KB | None | 0 0
  1. Flickable {
  2. id: rec
  3. height: 19
  4. width : 80
  5. contentWidth: width; contentHeight: height
  6. clip: true
  7. Text {
  8. id: xmovingBox
  9. anchors.left: parent.left
  10. opacity: 1
  11. text: "hello, world"
  12. font.pointSize: 18
  13. XAnimator {
  14. id: foo
  15. target: xmovingBox;
  16. //loops: Animation.Infinite
  17. from: 0//rec.width
  18. to: - (xmovingBox.width - rec.width) - rec.width /2;
  19. duration: 100 * Math.abs(to - from)
  20. running: false
  21. }
  22. }
  23. MouseArea {
  24. anchors.fill: parent
  25. hoverEnabled: true
  26. onEntered: {
  27. foo.running = true
  28. }
  29. }
  30. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement