2

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

Littlebitter
  • 671
  • 3
  • 10
  • 19

1 Answers1

1

Try to use mapToGlobal like this:

//menu.exec(pos);
menu.exec(mapToGlobal(pos));
Leo Chapiro
  • 13,678
  • 8
  • 61
  • 92
  • Yes, I do so, 'cos I have widgets in widgets. Is seems that it's possible to do what I what only by changing pos coordinates. – Littlebitter Apr 02 '13 at 15:36