A way to disable the long-left mouse click shortcut to enter "Edit Mode" / modifying widgets?

Koeame koeame0 at gmail.com
Mon Aug 15 16:12:21 BST 2022


Thank you very much Rene. l'll go and do as you suggested to see if that
works. My sleep schedule is awful so I apologize if my reporting is
sporadic. Thank you Duncan as well.

On Mon, Aug 15, 2022, 08:05 René J.V. Bertin <rjvbertin at gmail.com> wrote:

> On Monday August 15 2022 13:37:38 René J.V. Bertin wrote:
> > /*!
> >
> >     Set the timeout, in milliseconds, before the gesture triggers.
> >
> >     The recognizer will detect a touch down and if \a msecs
> >     later the touch is still down, it will trigger the
> QTapAndHoldGesture.
> >     The default value is 700 milliseconds.
> >
> > */
> > void QTapAndHoldGesture::setTimeout(int msecs)
> > {
> >
> >     QTapAndHoldGesturePrivate::Timeout = msecs;
> >
> > }
>
> NB: the timeout appears to be a global parameter, not something that can
> be varied so you cannot have different timeouts on tap-and-hold gestures
> (on different objects, for instance) in a single application.
>
> That means it *should* be possible to inject an override that sets the
> timeout to some sufficiently long duration so you don't trigger the gesture
> by accident but can still trigger it if you want to.
> That would be done by a simple call to QTapAndHoldGesture::setTimeout(); a
> good place to do that would be in a widget style. Those are typically not
> very complicated to build (and distros usually make it easy to install the
> build dependency of any of their packages).
>
> @Duncan: in what part of the code did you see the implementation? I put my
> own implementation in the KdePlatformTheme class which is one of the rare
> places where it gets exposed to just about any Qt application with a GUI.
> If the Plasma implementation is in a similar package (the plasma-framework
> isn't the most complex or expensive to build) it would be almost just as
> easy to disable the feature or set that timeout there.
>
> R.
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde/attachments/20220815/0ec6839b/attachment.htm>


More information about the kde mailing list