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

TapAndHoldGesture can finish (trigger) with no mouse buttons presse

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Reported
    • Priority: P3: Somewhat important
    • Resolution: Unresolved
    • Affects Version/s: 5.8, 5.9
    • Fix Version/s: None
    • Labels:
      None
    • Environment:
      Mac OS X 10.9 and Linux/XCB
    • Platform/s:
      macOS

      Description

      I'm using the Qt::TapAndHoldGesture to implement a click-and-hold-opens-contextmenu feature (https://github.com/RJVB/osx-integration/blob/qt590/src/platformtheme/kdemactheme.mm#L164 or https://raw.githubusercontent.com/RJVB/macstrop/master/Linux/kf5/kf5-plasma-integration/files/patch-clickandhold-contextmenu.diff for an XCB version).

      This mostly works fine but there are cases where I get the context menu even when I'm no longer holding the intended mouse button. A notable example is when I single-click a QToolButton that has a menu. As long as the menu is open my own event filter doesn't receive MouseButtonRelease or MouseMove events (used to cancel the click-and-hold process), but apparently Qt's own Gesture processing fails to receive crucial events too. Why would a TapAndHold gesture signal it is finished (read: trigger) when no mouse button is being held, that seems in total contradiction with the gesture name.

        Attachments

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

          Activity

            People

            Assignee:
            richard Richard Moe Gustavsen
            Reporter:
            rjvbertin René Bertin
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated:

                Gerrit Reviews

                There are no open Gerrit changes