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

Allow Flickable to ignore movement that may not be intended for it

    XMLWordPrintable

Details

    • Suggestion
    • Resolution: Unresolved
    • P4: Low
    • None
    • None
    • None

    Description

      The following code demonstrates the issue. It is easier to replicate with a touchscreen (where finger movement may not be as precise) than with a mouse.

      import QtQuick 2.0
      
      Flickable {
          width: 400; height: 400
          contentWidth: 800; contentHeight: 400
          flickableDirection: Flickable.HorizontalFlick
      
          Row {
              Repeater {
                  model: 10
                  delegate: Rectangle {
                      width: 80; height: 400
                      color: index % 2 ? "white" : "blue"
                  }
              }
          }
      }
      

      With this code, a movement of 300 vertical pixels and 25 horizontal pixels (a vertical swipe which is not perfectly precise) will result in minor movement of the Flickable in the horizontal direction. In some cases this may not be the desired behavior.

      It would be nice if this behavior was more configurable. This could perhaps be controlled by a bool property and/or threshold (e.g. don't allow horizontal movement if vertical movement was greater than horizontal movement, or if vertical movement was greater than 2 * horizontal movement, etc)

      Attachments

        Issue Links

          For Gerrit Dashboard: QTBUG-34570
          # Subject Branch Project Status CR V

          Activity

            People

              martinj Martin Jones
              mbrasser Michael Brasser
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:

                Gerrit Reviews

                  There are no open Gerrit changes