[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-devel
Subject:    Re: adding a menu to a KMainApplication
From:       Ian Wadham <ianw2 () optusnet ! com ! au>
Date:       2007-11-30 22:31:33
Message-ID: 200712010931.34159.ianw2 () optusnet ! com ! au
[Download RAW message or body]

On Fri, 30 Nov 2007 10:34 pm, Andras Mantia wrote:
> On Tuesday 27 November 2007, Lorenzo Bettini wrote:
> > Sorry if I insist on this: isn't there a way to add a menu from the
> > application itself with insertItem()?
>
> Yes, it is possible.
> Use something like: <snip>
>
Another method is to put an ActionList in a menu in your ui.rc file
and "plug" it with actions and menu item texts.   See:

http://websvn.kde.org/trunk/KDE/kdegames/kgoldrunner/src
files: kgoldrunnerui.rc, line 21 and kgoldrunner.cpp, line 613.

Caution: The plugging must be done *after* setupUI() and must
be re-done if toolbars get re-configured at any time.  OTOH this
is a good way to create a menu dynamically from files, etc. found
in the environment at run-time - in this case, game themes.

Cheers, Ian W.
 
>> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic