I have seen 2 may be 3 this kind of questions on this great forum but every one is very confusing,there is no need to go to signal/slot creator just got Qt Designer and follow the following steps
1.add Menu and action on menu bar and add any function in the slot of your mainwindow.h file as following
private slots:
void help();
2.Secondly add the following code in your mainwindow.cpp.
connect(ui->actionmyactions, SIGNAL(triggered()), this, SLOT(help()));
3.same can be done for menus as well using following code:
connect(ui->menuHelp, SIGNAL(aboutToShow()), this, SLOT(help()));
4.You can get the desired results without going to Qt Designer as following.
declare your action in your mainwindow.h as following
QAction *myaction;
and add following code in your mainwindow.cpp
myaction = ui->mainToolBar->addAction("help");
connect(myaction, SIGNAL(triggered()), this, SLOT(help()));