Originally Posted by
ebsaith
This is what I have
void MainWindow::slPopUpMenu()
{
newMenu
->addAction
(new QAction("Do that",
this));
}
void MainWindow::slPopUpMenu()
{
QMenu *newMenu = new QMenu(this);
newMenu->addAction(new QAction("Do that", this));
}
To copy to clipboard, switch view to plain text mode
how do get to the slot of the created action
after it is triggered
Im not seeing it!
As I said, connect to the action's triggered() signal
connect(action, SIGNAL(triggered()), this, SlOT(doThatSlot()));
newMenu->addAction(action);
QAction *action = new QAction("Do that", this));
connect(action, SIGNAL(triggered()), this, SlOT(doThatSlot()));
newMenu->addAction(action);
To copy to clipboard, switch view to plain text mode
Cheers,
_
Bookmarks