ProgressStressTest.qml 667 B

12345678910111213141516171819202122232425262728293031323334
  1. import QtQuick 2.0
  2. import "../QUItIndicators"
  3. Flow {
  4. id: root
  5. property real tempValue: 0;
  6. height: childrenRect.height
  7. Repeater {
  8. id: repeater
  9. model: 162
  10. ProgressIndicator {
  11. size: "small"
  12. value: tempValue
  13. showPercentages: false
  14. highlightColor: Qt.rgba(index/repeater.count, x/root.width, 1.0-y/root.height, 1.0)
  15. }
  16. }
  17. Timer {
  18. interval: 400
  19. repeat: true
  20. running: true
  21. onTriggered: {
  22. tempValue += Math.random() * 0.1;
  23. if (tempValue >= 1.0) {
  24. tempValue = 0.0;
  25. }
  26. }
  27. }
  28. }