Hi all,
Not sure if I've already requested this, but can we have a way to enable & disable menu items in Plugins?
Thanks in advance.
Shando
Looking for the index of the action is not necessarily convenient. If you have built the interface with QtCreator's form editor then you will have an action for each menu item. Their names are based on the text that you first give to the actions. For example if you interactively enter a menu item with title Foo Bar then an action named actionFoo_Bar is created for you. Just type ui->action in the code editor and watch what "name completion" QtCreator will propose.
In such a case I would consider a call like this:
ui->actionFoo_Bar.setEnabled(false);
You can even make the menu item disappear with
ui->actionFoo_Bar.setVisible(false);
function main()
lprint("Test Menu is engaged!");
qt.setDisabled(thisEditor, "actionTest2");
qt.setDisabled(thisEditor, "actionTest3");
qt.setEnabled(thisEditor, "actionTest3");
qt.hideWidget(thisEditor, "actionTest1");
end
an extension manager list that you can enable / disable certain plugins
Users browsing this forum: No registered users and 1 guest