Show customized context menu in applet and appletscript

Dong Tiger idlecat511 at gmail.com
Fri Oct 10 05:51:31 CEST 2008


Hi,

For example, the context menu shown by folderview when right clicking on a
file icon doesn't have menu items like "Remove this folder view" and
"Desktop options". Folderview achieves this by reimplementing
mousePressEvent.

But in an AppletScript subclass, there is no mousePressEvent to reimplement.
Also I feel reimplementing mousePressEvent to handle customized context menu
is a little overkill. I am thinking modifying contextualActions in Applet
and AppletScript from QList<QAction*> contextualActions() to QList<QAction*>
contextualActions(bool *appendable). If contexualActions set "appendable"
flag to false, then the caller should not append more actions.

How do you think about it?

--
Tiger
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.kde.org/pipermail/plasma-devel/attachments/20081010/adfe04a0/attachment.htm 


More information about the Plasma-devel mailing list