Accessing a (sub)menu defined in an XmlGui ui.rc file
Ismael Asensio
isma.af at gmail.com
Wed Jan 13 13:58:25 GMT 2021
Once you have the main QAction, it has a menu() method, which in turn has
an actions() method.
So for instance:
bar = foo->menu()->actions().at(0).
Of course with much more logic to check that every item exists and not
hardcoding the position, but I hope you get the point.
El mié., 13 ene. 2021 14:24, Thomas Baumgart <thb at net-bembel.de> escribió:
> On Mittwoch, 13. Januar 2021 11:50:50 CET Tobias Leupold wrote:
>
> > Hi Thomas!
> >
> > 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
>
> Ooops, my bad, or as we say in German "Thema verfehlt, setzen, sechs" :)
>
> --
>
> Regards
>
> Thomas Baumgart
>
> https://www.signal.org/ Signal, the better WhatsApp
> -------------------------------------------------------------
> The shortest words, namely yes and no,
> require the most thoughts. -- Pythagoras of Samos
> -------------------------------------------------------------
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-devel/attachments/20210113/8ced8d10/attachment.htm>
More information about the kde-devel
mailing list