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

OS X: try to detect swipe gesture distinctly from mouse wheel

    XMLWordPrintable

Details

    • macOS

    Description

      Suggestion from https://codereview.qt-project.org/#/c/99800/:

      Alexander Volkov Dec 25 4:53 PM

      Patch Set 9:

      What about https://developer.apple.com/library/mac/documentation/Cocoa/Reference/ApplicationKit/Classes/NSResponder_Class/#//apple_ref/occ/instm/NSResponder/wantsScrollEventsForSwipeTrackingOnAxis: ?
      Shawn Rutledge Dec 29 7:45 AM

      Patch Set 9:

      Not sure I understand your point. A way to get the pan gesture working?

      "The events are forwarded only on the following condition: the content to be scrolled is already at the edge of the scrolled direction when the scroll gesture begins. Otherwise, the view performs elastic scrolling."

      Sounds like they mean if you are at the top of the view and you try to scroll up with the 2-finger flick, so that it's going to try to bounce back right away; or at the bottom and you try to scroll down. Or maybe I don't understand that either.
      Alexander Volkov Dec 29 9:51 AM

      Patch Set 9:

      Well the documentation is rather messy. Maybe this will help: https://stackoverflow.com/questions/12748072/how-to-properly-use-swipewithevent-to-navigate-a-webview-obj-c

      The idea is to return YES from wantsScrollEventsForSwipeTrackingOnAxis, call trackSwipeEventWithOptions in scrollWheel and to process swipe gestures in a handler.

      Attachments

        Issue Links

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

          Activity

            People

              srutledg Shawn Rutledge
              srutledg Shawn Rutledge
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:

                Gerrit Reviews

                  There are no open Gerrit changes