QMenu *menu = new QMenu(tr("Right Contex Menu"),this); menu->setStyleSheet("background-color : normal"); menu->addAction(Action1); menu->addAction(Action2); menu->addAction(Action3); menu->addSeparator(); menu->addAction(Action4); menu->exec(event->globalPos());
|