@Roysten-Rigobert Why don't you create menu/actions at once by making menu as member variable? and in contextMenu(QPoint) slot call only the menu->exec(mapToGlobal(pos));