QMenu -> PUD

Mark Kretschmann kretschmann at kde.org
Fri Oct 30 07:50:56 CET 2009


On Fri, Oct 30, 2009 at 3:19 AM, Jeff Mitchell <mitchell at kde.org> wrote:
> A much requested feature is done as of 24a39b4: you can now create a PUD
> directly from a QMenu. Here's how. One caveat: right now, it can't
> create more than two levels, so if you have a submenu in a submenu, it
> won't work. If this is actually a problem for us (AFAIK it isn't) I'll
> look at this sooner rather than later.
>
> QMenu *myMenu;
> PopupDropper *pud = The::popupDropperFactory::createPopupDropper( this );
> pud->addMenu( myMenu );
> The::popupDropperFactory::adjustItems( pud );
>
> That's it! Seriously -- that's it. You can get rid of all the other
> stuff now.  :-)
>
> One other thing -- addMenu *adds* items, so you can mix and match
> QMenu-added items and items added to the PUD another way.

That's really great news. One question (I'm not quite sure here): Does
this also pave the way for putting all cover fetching actions into a
sub-menu in our context menus?

I remember there was some technical issue for why this couldn't be
done, but I think it would really help reduce clutter.

-- 
Mark Kretschmann
Amarok Developer
www.kde.org - amarok.kde.org


More information about the Amarok-devel mailing list