Thanks David. It works.
I ended up with this approach.
```
specialistMenuAction[specialistMenuActionIndex]->setData(QVariant(QString(iter->first.c_str(;
```
void MainWindow::specialistMenuHandler()
{
QAction *actionP(qobject_cast(QObject::sender()));
if (actionP) {
QStr
in your handler you can call this:
> QAction *actionP(qobject_cast(QObject::sender()));
and you'll get the action that caused the sending.
you can have previously stuffed something interesting into the objectName of
the action, then recover it in your handler
does that make sense?
> On J
Hi,
I am programmatically generating a menu, each menu item has a unique
name/label
How can I determine which of the generated menu was clicked ?
```
void MainWindow::init()
{
:
:
QMenu *specialists = menuBar()->addMenu("&Specialists");
if (!_engine.getSpecialistsManager().registeredSpeciali