KGuiAddons and QGestures like tap/click-and-hold to open context menu?
René J.V. Bertin
rjvbertin at gmail.com
Wed Mar 15 13:14:23 UTC 2017
This actually works pretty nicely:
https://commits.kde.org/scratch/rjvbb/osx-integration/1bfc3c00293dff6c726d0853457ab09b560e3df9
- m_grabbing is still used to track whether the 1st mousebutton press must be resend after grabbing the gesture. I prefer that to using a separate object property, or a tristate property.
- set the "grabbed" QObject property to False when a mousebutton release event is received. This is a safe alternative to ungrabbing the gesture when we cannot know if the object already grabs it.
- generate a mousebutton release event before generating a contextmenu event. It might be more ideal to do this only when the object does handle the context menu event but then the event order would be wrong.
R
More information about the Kde-frameworks-devel
mailing list