Accessing a (sub)menu defined in an XmlGui ui.rc file
tobias.leupold at gmx.de
Wed Jan 13 10:50:50 GMT 2021
Thanks for this info, but this is about context menus ... I want to access a
submenu inside a menu of the main menu bar ... such as the "File" -->
"Recently used" menu of KWrite or such
Am Mittwoch, 13. Januar 2021, 11:25:18 CET schrieb Thomas Baumgart:
> Here's how it is done in KMyMoney (may not be the best way, but it's
> creates all the menus during initialization. The QStringLiterals contain the
> names used in the xmlgui.rc file. KMyMoneyApp is derived from KXmlGuiWindow
> and thus provides the factory() method. The actions need to exist before
> the menu is initialized from what I see. All this is called before
> setupGUI() is executed.
> The context menu can then be executed by e.g.
> Hope that helps and gives you some ideas.
More information about the kde-devel