I have a custom widget which reimplements QMainWindow. It has a statusbar and menubar and the main window area between. I want a context menu to appear in the main area when right clicked but not if the right click is on the status bar or menubar. How do I exclude them? I was thinking of checking the position of the click and seeing if that was within the allowed area but I'm not sure how.
Right now I'm using this:
But it gives me a context menu everywhereQt Code:
contextMenu->exec(event->globalPos()); }To copy to clipboard, switch view to plain text mode
Thanks
Bookmarks