Reputation: 701
I have QPoint pos after clicking mouse and what to show at this point QMenu. But I what menu to appear that this pos will be left top corner of QMenu. And
menu.exec(pos);
shows menu such that pos is it's left edge middle point
Upvotes: 2
Views: 1205
Reputation: 13979
Try to use mapToGlobal like this:
//menu.exec(pos);
menu.exec(mapToGlobal(pos));
Upvotes: 1