PDA

View Full Version : popup a menu for one page in QTabwdget???



senfrans
17th April 2008, 08:48
as my title ,I have made it
but it didnot come for the purpose that I want?

here is my code for the slot:
void desktop::myslot2()
{
QMenu menu(page2);
menu.addAction(action_New_Desktop);
menu.addAction(actionAbout);
menu.addAction(actionCustomize);
menu.addAction(actionClose);
//menu.exec(mapToGlobal(event->pos()));
menu.exec( QCursor::pos());
}

it can popup a menu when I check the right button in this page anywhere
I just want to popup it on the top rectangle of the page which added in a object of Qtabwidget

I don't know whether I had described correctly