You forgot to adjust frmSettings::ProvideContexMenu(). It still takes a pointer.
The easiest way to construct a context menu is to use Qt::ActionsContextMenu. All it takes is to add actions via QWidget::addAction() and the menu is constructed automatically for you:
setContextMenuPolicy(Qt::ActionsContextMenu);
connect(fooAction, SIGNAL(triggered()), this, SLOT(doSomethingFoo()));
connect(barAction, SIGNAL(triggered()), this, SLOT(doSomethingBar()));
addAction(fooAction);
addAction(barAction);
setContextMenuPolicy(Qt::ActionsContextMenu);
QAction* fooAction = new new QAction("foo");
QAction* barAction = new new QAction("bar");
connect(fooAction, SIGNAL(triggered()), this, SLOT(doSomethingFoo()));
connect(barAction, SIGNAL(triggered()), this, SLOT(doSomethingBar()));
addAction(fooAction);
addAction(barAction);
To copy to clipboard, switch view to plain text mode
Bookmarks