QMenu -> PUD

Nikolaj Hald Nielsen nhnfreespirit at gmail.com
Fri Oct 30 08:19:42 CET 2009


Woho!

Good stuff! This has been my #1 feature request for the PUD since...
well, since I first started using it!

Thanks Jeff! :-)

- Nikolaj

On Fri, Oct 30, 2009 at 3:19 AM, Jeff Mitchell <mitchell at kde.org> wrote:
> Hey,
>
> 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.
>
> --Jeff
>
>
> _______________________________________________
> Amarok-devel mailing list
> Amarok-devel at kde.org
> https://mail.kde.org/mailman/listinfo/amarok-devel
>
>


More information about the Amarok-devel mailing list