In your widget form change the property "contestMenuPolicy" (in your right pane) to DefaultContextMenu. Right click the widget and choose "Go to Slot" -> "CustomContextMenuRequest" . It will create a function for you. Now in that function add a QMenu:
Qt Code:
{ QMenu menu; menu.addAction(someActionCreatedByYou1); menu.addAction(someActionCreatedByYou2); }To copy to clipboard, switch view to plain text mode
Voilá. You will have to add proper includes i.e #include<QMenu>
Bookmarks