On Sunday March 12 2017 17:52:25 David Faure wrote:

> > And if you make it an optional feature in the QPA it (almost?) becomes
> > something that users might want to control the way they could control
> > certain things via Q4's qtconfig .
> 
> Or systemsettings, sure.
> 
> > Maybe the QPA platform integration plugin could be a good place, I'll tinker
> > with that in my osx-integration plugin.

Doh, we forgot something ...

You need to "subscribe the widget to a given gesture with specific flags" using 
QWidget::grabGesture(). I don't see any documented way to enable gestures of a 
given type for all current and future widgets or QGraphicsObjects.

That probably makes it impossible to implement this kind of feature the way you 
were implying, outside of Qt itself. All I see is an implementation in a 
library, where you create a single instance (per application) of a dedicated 
class that contains the eventFilter() function. And a static method that takes 
a QWidget, subscribes it to the gesture and installs the event filter.

R.

Reply via email to