There is a QML application showing the list of items by means of ListView component:
listview.jpg

When ListView is scrolled its content often goes beyond the borders:
listview-overscrolled.jpg

I thought it could be adjusted by setting boundsBehavior to Flickable.StopAtBounds, but although I have done that, it still behaves like it is shown above.

The code is quite simple:
Qt Code:
  1. import QtQuick 2.0
  2. import QtQuick.Controls 2.0
  3.  
  4. Rectangle
  5. {
  6. color: "gray"
  7.  
  8. Rectangle
  9. {
  10. color: "blue"
  11. border.color: "orange"
  12. anchors { fill: parent; margins: 50 }
  13.  
  14. ListView
  15. {
  16. anchors { fill: parent; margins: parent.border.width }
  17. boundsBehavior: Flickable.StopAtBounds
  18. //snapMode: ListView.SnapOneItem
  19. //snapMode: ListView.SnapToItem
  20. //preferredHighlightBegin: 0
  21. //preferredHighlightEnd: 0
  22. //highlightRangeMode: ListView.StrictlyEnforceRange
  23. //cacheBuffer: 200
  24. model: [ "What", "a", "hell", "is", "wrong", "with", "you?"]
  25. delegate: Item
  26. {
  27. height: 150
  28. width: parent.width
  29. Rectangle
  30. {
  31. anchors.fill: parent
  32. color: "lightgray"
  33. Text { text: modelData; font.pixelSize: 50 }
  34. }
  35. } // delegate
  36.  
  37. //ScrollBar.vertical: ScrollBar {}
  38. } // ListView
  39. } // Rectangle (listview border)
  40. } // Rectangle (main)
To copy to clipboard, switch view to plain text mode 

Any ideas?