Re: Accessing a (sub)menu defined in an XmlGui ui.rc file

2021-01-13 Thread David Hurka
On Wednesday, January 13, 2021 10:39:48 AM CET Tobias Leupold wrote: > Hi list :-) > > I have a problem with a KXmlGuiWindow and I honestly can't find respective > docs or howtos/tutorials. I hope someone here can help me ... I faced the same problem... :( > It's a allegedly basic task: How can

Re: Accessing a (sub)menu defined in an XmlGui ui.rc file

2021-01-13 Thread Tobias Leupold
Hi Alexander :-) This actually works! It has to be done after having called setupGUI(), just to notice this, otherwise, one still gets a nullptr. What I did in the example I wrote before: #include #include ... setupGUI(Keys | Save | Create, "demoui.rc"); auto *guiFactory

Re: Accessing a (sub)menu defined in an XmlGui ui.rc file

2021-01-13 Thread Alexander Semke
Hi Tobias, > I have a problem with a KXmlGuiWindow and I honestly can't find respective > docs or howtos/tutorials. I hope someone here can help me ... > [...] > But how can I get the "bar" QMenu (or it's respective QAction)? So that I > can > e. g. disable or hide the menu, or assign an icon? For

Re: Accessing a (sub)menu defined in an XmlGui ui.rc file

2021-01-13 Thread Tobias Leupold
I still don't get it :-D All I get is nullptrs ... Maybe I'm missing the forest for the trees?! I now attached a minimal example showing my dilemma. After having put demoui.rc to ~/.local/share/kxmlgui5/demo/, the GUI is setup nicely and all, but how do I get a pointer to the "subMenu" menu? To e

[ANNOUNCE] CMake 3.19.3 available for download

2021-01-13 Thread Tom Osika
We are pleased to announce that CMake 3.19.3 is now available for download. Please use the latest release from our download page: https://cmake.org/download/ Thanks for your support! Changes made since CMake 3.19.2:

Re: Accessing a (sub)menu defined in an XmlGui ui.rc file

2021-01-13 Thread Ismael Asensio
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

Re: Accessing a (sub)menu defined in an XmlGui ui.rc file

2021-01-13 Thread Thomas Baumgart
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 s

Re: Accessing a (sub)menu defined in an XmlGui ui.rc file

2021-01-13 Thread Tobias Leupold
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 Am Mittwoch, 13. Januar 2021, 11:25:18 CET schrieb Thomas Baumgart: > Here's how it is done in KMyMo

Re: Accessing a (sub)menu defined in an XmlGui ui.rc file

2021-01-13 Thread Thomas Baumgart
On Mittwoch, 13. Januar 2021 10:39:48 CET Tobias Leupold wrote: > Hi list :-) > > I have a problem with a KXmlGuiWindow and I honestly can't find respective > docs or howtos/tutorials. I hope someone here can help me ... > > It's a allegedly basic task: How can I access a submenu (or better: a >

Accessing a (sub)menu defined in an XmlGui ui.rc file

2021-01-13 Thread Tobias Leupold
Hi list :-) I have a problem with a KXmlGuiWindow and I honestly can't find respective docs or howtos/tutorials. I hope someone here can help me ... It's a allegedly basic task: How can I access a submenu (or better: a submenu's QAction) for a menu defined in a ...ui.rc file? If I define the su