[Qt-creator] One submenu for two plugins?
Thomas Meyer
public at meyer-thomas.com
Wed May 22 11:41:25 CEST 2013
Hi,
I want to have the menu 'Tools' -> 'Kepler'.
With one plugin I want to add the action 'Ellipse Orbit...'
and with another plugin I want o add the action 'Eccentric Anomaly...'?
In the eccentric anomaly plugin I have in the 'intialize' function the code:
...
QAction*action=newQAction(tr("EccentricAnomaly..."),this);
Core::Command *cmd = Core::ActionManager::registerAction(action,
Constants::ACTION_ID,
Core::Context(Core::Constants::C_GLOBAL));
cmd->setDefaultKeySequence(QKeySequence(tr("Ctrl+Alt+Meta+A")));
connect(action, SIGNAL(triggered()),
this, SLOT(showEccAnomDialog()));
Core::ActionContainer *menu = Core::ActionManager::createMenu(Constants::MENU_ID);
menu->menu()->setTitle(tr("Kepler"));
menu->addAction(cmd);
Core::ActionManager::actionContainer(Core::Constants::M_TOOLS)->addMenu(menu);
...
Similar in the ellipse orbit plugin.
So, I get *two* 'Kepler' submenus, but I want only one.
How can I reach this?
Thanks a lot!
Thomas Meyer
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/qt-creator/attachments/20130522/8a713769/attachment.html>
More information about the Qt-creator
mailing list