Use QMenu->popup() instead of QMenu->exec() everywhere