<br><br><div class="gmail_quote">On Fri, Aug 2, 2013 at 3:08 PM, Aurélien Gâteau <span dir="ltr"><<a href="mailto:agateau@kde.org" target="_blank">agateau@kde.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi,<br>
<br>
As you may know, I am contributing to the KDE Frameworks project, which aims<br>
at splitting the existing Qt4-based kdelibs into separate, finer-grained, Qt5-<br>
based components. Another objective of this project is to get some of the<br>
features KDE developers added to Qt widgets back into Qt itself.<br>
<br>
One of those features was "delayed menus" for buttons. When used on a button,<br>
then a short click on the button triggers a default action, while holding the<br>
mouse pressed on the button shows a menu with more actions. Qt provides this<br>
feature for toolbar buttons but not for regular buttons (QPushButton).<br>
<br>
in kdelibs, KPushButton extends QPushButton and add this delayed menu feature,<br>
so the original task was to implement the same in QPushButton, so that we<br>
could get rid of KPushButton. After a bit of research, we found out this<br>
feature was very seldom used and we felt it was surprising: buttons with<br>
delayed menus look like menu-buttons (buttons where a short click always show<br>
a menu) but behave differently.<br>
<br>
Here is an example of such a button: Kate session dialog. To get this dialog<br>
to show, open the config dialog, go to  Application > Sessions, and select<br>
the "Manually choose a session" radio button. Now restart Kate, the dialog<br>
should appear. It looks like this:<br>
<br>
<a href="http://6g6.eu/sih0-kate-session-dialog-1.png" target="_blank">http://6g6.eu/sih0-kate-session-dialog-1.png</a><br>
<br>
Clicking the "New Session" button creates a new session. When you hold down<br>
the mouse button on it, you get this menu:<br>
<br>
<a href="http://6g6.eu/sih0-kate-session-dialog-2.png" target="_blank">http://6g6.eu/sih0-kate-session-dialog-2.png</a><br>
<br>
The KDE Frameworks project maintains a porting document which suggest<br>
developers alternatives for features which are going away. What should we<br>
suggest to developers using this feature? A generic solution would be<br>
recommending the use of a plain menu button, but I am not sure if it is always<br>
practical since it means the default action will require two clicks instead of<br>
one.<br>
<br></blockquote><div><br></div><div>I like the usage of "split button dropdowns" as seen here <a href="http://getbootstrap.com/components/">http://getbootstrap.com/components/</a>. It's quite clear, click on the left you get the button, click on the right you'd get the menu.</div>
<div><br></div><div>On a technical level it'd be harder to get that into Qt, but it's something we could make that could go into KWidgetAddons just fine.</div><div><br></div><div>Dave</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

<br>
Aurélien<br>
_______________________________________________<br>
kde-guidelines mailing list<br>
<a href="mailto:kde-guidelines@kde.org">kde-guidelines@kde.org</a><br>
<a href="https://mail.kde.org/mailman/listinfo/kde-guidelines" target="_blank">https://mail.kde.org/mailman/listinfo/kde-guidelines</a><br>
</blockquote></div><br>