PDA

View Full Version : Accessing Menubar in the sourcecode.



baluk
18th November 2010, 18:05
Hi,

In my app, I have a menubar already created int he UI file. But when I try to write Signal Slot for the menubar actions, i can't find them unlike for other widgets with
ui->label. I have two actions "Fileload" and "Exit". I want to access them into the code like


connect(ui->menuBar->Fileload, SIGNAL(triggered()), this, SLOT(callthefunction));

Please tell me how can I do this.

Thank You,
Baluk

high_flyer
18th November 2010, 20:25
You will have action objects for the actions:
ui->actionFileLoad or similar.
Designer already associated the action with your menus.