Guest User

30 seconds chart in qml

a guest
Mar 23rd, 2011
947
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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. }
RAW Paste Data

Adblocker detected! Please consider disabling it...

We've detected AdBlock Plus or some other adblocking software preventing Pastebin.com from fully loading.

We don't have any obnoxious sound, or popup ads, we actively block these annoying types of ads!

Please add Pastebin.com to your ad blocker whitelist or disable your adblocking software.

×