Details
-
Type:
Bug
-
Status: Reported
-
Priority:
P3: Somewhat important
-
Resolution: Unresolved
-
Affects Version/s: 5.8, 5.9
-
Fix Version/s: None
-
Component/s: Widgets: Gesture Support
-
Labels:None
-
Environment:Mac OS X 10.9 and Linux/XCB
-
Platform/s:
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.