How do I hide a complete menu from the menu bar (for example the Misc menu)?
Hiding a menu from the menu bar
Moderator: andrew
Forum rules
Always indicate your operating system and QCAD version.
Attach drawing files, scripts and screenshots.
Post one question per topic.
Always indicate your operating system and QCAD version.
Attach drawing files, scripts and screenshots.
Post one question per topic.
Hiding a menu from the menu bar
From a QCAD user:
Re: Hiding a menu from the menu bar
In Qt, the action that triggers the menu (QAction) has to be hidden, not the menu item (QMenu).
To hide an individual tool:
To hide a main menu (for example the Misc menu) from the menu bar:
or
To hide an individual tool:
Code: Select all
var a = RGuiAction.getByScriptFile("scripts/Path/To/Original/Tool/Tool.js");
a.setVisible(false);
Code: Select all
var m = Misc.getMenu();
var a = m.menuAction();
a.setVisible(false);
Code: Select all
var appWin = EAction.getMainWindow()
var m = appWin.findChild("MiscMenu");
var a = m.menuAction();
a.setVisible(false);