Hi i have a QMenu which is used as a popup menu.
This menu contains a sub menu which can contain up to 10 sub menu items which are added dynamicaly. I would like to call the same slot from this 10 submenu items when triggered, but with an id parameter (1-10). How can i do this? When creating the menu action i can only do something like this menu->addAction("Menu item 1",this,SLOT(dowork(int))).
how can i make the action do something like this: menu->addAction("Menu item 1",this,SLOT(dowork(1))) ?
Is there a way to tell the action to send a parameter to the slot?
Bookmarks