javascript Code:
  1. import QtQuick 2.0
  2.  
  3. Item {
  4. id: root
  5. width: 800
  6. height: 800
  7.  
  8. Rectangle {
  9. id: im2
  10. width: 600
  11. height: 50
  12. anchors.centerIn: parent
  13.  
  14. Rectangle {
  15. id: im1
  16. property int vi: 0
  17.  
  18. width: 80; height: 80; radius: width/2
  19. anchors.verticalCenter: parent.verticalCenter
  20. x: im2.width*vi/10
  21. PropertyAnimation on vi {
  22. from: 0
  23. to: 10
  24. duration: 3000
  25. loops: Animation.Infinite
  26. running: true
  27. }
  28. }
  29. }
  30. }
To copy to clipboard, switch view to plain text mode