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

Provide an API to make an input handler "exclusive"

    XMLWordPrintable

Details

    Description

      Consider the design in the sample attached. Both DragHandler and PinchHandler are handling the same target. The problem with that is for example DragHandler may take over the exclusive grab during PinchHandler is finishing. The result is that target "jumps" to the end position of pinch gesture.

      As far as I see, there can be hardly an easy fix. A rather quick fix can be a timer that keeps DragHandler disabled for a short period of time. A safer way is to install an event filter to carefully enable/disable handlers based on event sequence. Either way, it is sort of suboptimal.

      So what I have in mind is, e.g., a simple "switch", like a property, that makes a handler exclusively grabs events during the entire gesture. Something like "grabPermissions: PointerHandler.TakeOverForbidden", but stricter. "TakeOverForbidden" at least cannot stop DragHandler from grabbing exclusive during PinchHandler finishing.

      Attachments

        1. QTBUG-136670.7z
          1 kB
          Luqiao Chen
        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
            luqiaochen Luqiao Chen
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes