Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-19834

Need a way to limit ListView's over bounds dragging

    XMLWordPrintable

Details

    Description

      There needs to be a way to limit the negative range of a view's contentY that
      doesn't cause it to lock-up.

      I.e. run the code below. Drag slowly down as to reveal more than 100 pixel-lines
      behind the list. Note how the list items stop, showing only 100 pixel-lines of
      white. Release the mouse button and note how the list slides back to contentY == 0.

      Now flick down fast and note how the list items get stuck at contentY == -100.

      import QtQuick 1.1
      
      Rectangle {
          width: 360
          height: 480
      
          ListView {
              anchors.fill: parent
              model: 200
              onContentYChanged: if(contentY < -100) contentY = -100;
              delegate: Rectangle {
                  width: ListView.view.width
                  height: 40
                  color: index % 2 ? "gray" : "lightgray"
              }
          }
      }
      

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            qt.team.quick.subscriptions Qt Quick and Widgets Team
            mathiasm Mathias Malmqvist
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes