[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: David Faure <faure () kde ! org>
Date: 2017-03-12 14:27:43
Message-ID: 5041624.EBH2o89FDt () asterixp50
[Download RAW message or body]
On dimanche 12 mars 2017 09:03:51 CET René J.V. Bertin wrote:
> Hello,
>
> The other day I had to add a context menu to a widget (QPushbutton) defined
> in a .ui file and went a bit further when I realised it could be nice to be
> able to open such a menu without using a right-click or menu button. After
> all, not all platforms have a (physical) right mouse button or a menu key;
> Macs come to mind but also mobile devices.
>
> The usual way to open the context menu on such platforms is
> click/tap-and-hold - I think that was actually introduced in an early Mac
> OS X version.
>
> With Qt's TapAndHold gesture this is actually not difficult to implement at
> all, see
> https://forum.qt.io/topic/46738/how-to-simulate-properly-an-long-click-on-t
> he-mouse-on-a-button-updated-with-full-code/10#
>
> Would this be an idea to add to a framework like KGuiAddons?
Isn't this exactly what QToolButton::setMenu does?
(given that the default popupMode is DelayedPopup)
--
David Faure, faure@kde.org, http://www.davidfaure.fr
Working on KDE Frameworks 5
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic