Re: [Qgis-user] Looking for QGIS Python code for a three-level menu?

2024-05-12 Thread Raymond Nijssen via QGIS-User
Wow, this is so much more logical! If this works, then why do we (still) have the addPluginToMenu() available? Raymond On 12-05-2024 22:26, Jürgen E. Fischer via QGIS-User wrote: Hi Mike, On Sun, 12. May 2024 at 17:35:14 +, Elstermann, Mike via QGIS-User wrote: I'm looking for a piece

Re: [Qgis-user] Search through folders and combine SHP files

2024-05-12 Thread Even Rouault via QGIS-User
Hi, The GDAL ogrtindex might be of good help to create an index of various vector sources: https://gdal.org/programs/ogrtindex.html And you can possibly "gdalmanage identify -r some_path" to find all GDAL recognizable datasets: https://gdal.org/programs/gdalmanage.html Even Le 12/05/2024

Re: [Qgis-user] Search through folders and combine SHP files

2024-05-12 Thread Tony Shepherd (FarmMaps NZ) via QGIS-User
Hi Nigel Thank you, that works a treat, although it does fail if I try to merge a line feature at the same time as a polygon. That is not a big deal and can get around that. Your comment, “Then parse these through to the merge vector layer”. I can’t see a way of parsing the

Re: [Qgis-user] Looking for QGIS Python code for a three-level menu?

2024-05-12 Thread Jürgen E . Fischer via QGIS-User
Hi Mike, On Sun, 12. May 2024 at 17:35:14 +, Elstermann, Mike via QGIS-User wrote: > I'm looking for a piece of QGIS Python code for a three-level menu, something > like this: > > Plugins >| >| > MyMenu > -+-- Submenu 1 > SubSubMenu 1.1 >| | +---

Re: [Qgis-user] Looking for QGIS Python code for a three-level menu?

2024-05-12 Thread Raymond Nijssen via QGIS-User
Hi Mike, I'm afraid you cannot add submenus to the plugin menu. The addPluginToMenu function only takes actions as an argument: action_1 = QAction('Action 1') iface.addPluginToMenu('Plugin 1', action_1) menu_1 = QMenu('Menu 1') iface.addPluginToMenu('Plugin 1', menu_1) The last line

[Qgis-user] Looking for QGIS Python code for a three-level menu?

2024-05-12 Thread Elstermann, Mike via QGIS-User
Hello everyone, I'm looking for a piece of QGIS Python code for a three-level menu, something like this: Plugins | | MyMenu > -+-- Submenu 1 > SubSubMenu 1.1 | | +--- SubSubMenu 1.2 | | +--- SubSubMenu 1.3 Other... | +-- Submenu