hello,
i am a newer of qt,and use designer,i found i can add some menu and sub menu of the mainwindow,can add a action to each menu item and a slot of the action,but i does not work,what is the matter?
  i use the vs 2008 with qt integration plugin.i created a new project of qt application. i add a menu item called 'SYSTEM,the objectname is :menuSYSTEM,then the plugin can create the code below:
  menuSYSTEM = new QMenu(menuBar);
menuSYSTEM->setObjectName(QString::fromUtf8("menuSYSTEM"));
  
after that ,i add a new action,and the Text property of the action is 'SYSTEM'。the code is:
  actionSysterm = new QAction(MainWindow);
actionSysterm->setObjectName(QString::fromUtf8("actionSysterm")) ;
menuBar->addAction(menuSYSTEM->menuAction());
  
now i add a slot which the sender is the action:
  QObject::connect(actionSystem,SIGNAL(triggered() ),MainWindow,SLOT(close());

after i compile the code,i does not work。so i tried to modify the code of 'ui_Mainwindow.h'
change menuBar->addAction(menuSYSTEM->menuAction());
to
menuBar->addAction(actionSystem);
now it works.
what is the matter?whether my procedure is right?
i think that modify the ui_xxx.h is not a normal ,is that right?who can tell me how to do it?
thanks.