Advertisement
Guest User

Untitled

a guest
Sep 5th, 2018
150
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.59 KB | None | 0 0
  1. import QtQuick 2.11
  2. import QtQuick.Window 2.11
  3.  
  4. Window {
  5. visible: true
  6. width: 640
  7. height: 480
  8. title: qsTr("Hello World")
  9.  
  10. Flickable {
  11. id: flickable
  12. anchors.fill: parent
  13. interactive: true
  14. contentWidth: img.width
  15. contentHeight: img.height
  16.  
  17. Rectangle {
  18. id: img
  19. width: 4000
  20. height: 2000
  21. color: "red"
  22.  
  23. Repeater {
  24. model: 40
  25. Rectangle {
  26. x: index * 100 + 5
  27. width: 100
  28. height: 500
  29. property real tmp: ((100 * index) % 256) / 256
  30. color: Qt.rgba(tmp, tmp, tmp, 1)
  31. anchors.verticalCenter: parent.verticalCenter
  32. }
  33. }
  34. }
  35.  
  36. SequentialAnimation {
  37. running: true
  38. loops: 100
  39. NumberAnimation {
  40. target: img
  41. property: "x"
  42. from: 0
  43. duration: 5000
  44. to: -img.width
  45. }
  46. NumberAnimation {
  47. target: img
  48. property: "x"
  49. to: 0
  50. duration: 5000
  51. from: -img.width
  52. }
  53. }
  54. }
  55. }
  56.  
  57. //LibGL Vendor: Intel Open Source Technology Center
  58. //Renderer: Mesa DRI Intel(R) Ivybridge Desktop
  59. //Version: 3.0 Mesa 18.0.5
  60. //Shading language: 1.30
  61. //Format: Version: 3.0 Profile: 0 Swap behavior: 0 Buffer size (RGB): 8,8,8
  62. //Profile: None (QOpenGLFunctions_3_0)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement