Page1.qml 823 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. import QtQuick 2.11
  2. Rectangle {
  3. id: page1
  4. signal message(string msg)
  5. width: 300
  6. height: 300
  7. color: "red"
  8. MouseArea {
  9. anchors.fill: parent
  10. onClicked: myItem.message("clicked!");
  11. }
  12. /*
  13. function show(){
  14. animationShow.running = true
  15. }
  16. function exit(){
  17. //BreatheTestJs.exit = true
  18. animationExit.running = true
  19. //startStopButton.running = false
  20. //stopTimer.start()
  21. }
  22. //加载任务动画效果
  23. NumberAnimation {
  24. id: animationShow
  25. target: page
  26. property: "x"
  27. from: page.x
  28. to: 0
  29. duration: 50
  30. }
  31. NumberAnimation {
  32. id: animationExit
  33. target: page
  34. property: "x"
  35. from: page.x
  36. to: 1024
  37. duration: 50
  38. }
  39. */
  40. }