Advertisement
Guest User

Untitled

a guest
Oct 8th, 2014
258
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.12 KB | None | 0 0
  1. diff --git a/examples/quick/controls/gallery/content/ModelView.qml b/examples/quick/controls/gallery/content/ModelView.qml
  2. index 5474f1b..7972d82 100644
  3. --- a/examples/quick/controls/gallery/content/ModelView.qml
  4. +++ b/examples/quick/controls/gallery/content/ModelView.qml
  5. @@ -66,13 +66,14 @@ Item {
  6. ListModel {
  7. id: dummyModel
  8. Component.onCompleted: {
  9. - for (var i = 0 ; i < 100 ; ++i) {
  10. + for (var i = 0 ; i < 1000 ; ++i) {
  11. append({"index": i, "title": "A title " + i, "imagesource" :"http://someurl.com", "credit" : "N/A"})
  12. }
  13. }
  14. }
  15.  
  16. TableView{
  17. + id: tv
  18. model: dummyModel
  19. anchors.fill: parent
  20.  
  21. @@ -100,4 +101,20 @@ Item {
  22. visible: true
  23. }
  24. }
  25. +
  26. + Timer {
  27. + id: tt
  28. + property int index: 0
  29. + interval: 20
  30. + repeat: true
  31. + onTriggered: {
  32. + index = (index + 30) % 1000;
  33. + tv.positionViewAtRow(index);
  34. + }
  35. + }
  36. +
  37. + Button {
  38. + text: "Start Timer"
  39. + onClicked: tt.start()
  40. + }
  41. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement