[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-frameworks-devel
Subject: Re: KGuiAddons and QGestures like tap/click-and-hold to open context menu?
From: René_J.V. Bertin <rjvbertin () gmail ! com>
Date: 2017-03-12 19:11:08
Message-ID: 2185296.tvcEaq6VvI () portia ! local
[Download RAW message or body]
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.
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic