Advertisement
Guest User

30 seconds chart in qml

a guest
Mar 23rd, 2011
1,079
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.56 KB | None | 0 0
  1. import Qt 4.7
  2.  
  3. Rectangle {
  4. id: root
  5. width: 500
  6. height: 500
  7.  
  8. property int vvv: 10
  9.  
  10. Repeater {
  11. model: 10
  12.  
  13. Rectangle {
  14. anchors.bottom: parent.bottom
  15. x: (index*(width+10))-30
  16. width: root.width / 12
  17. height: Math.sin(index+vvv)*30+100/index + vvv
  18. color: Qt.darker('blue', Math.cos(index/10))
  19.  
  20. Behavior on height { PropertyAnimation { } }
  21. }
  22. }
  23.  
  24. MouseArea {
  25. anchors.fill: parent
  26. onClicked: root.vvv += 30
  27. }
  28. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement