@BigBen
When you go QMenu::addAction("SomeString") it creates a QAction for you, and returns it. And QMenu::exec() returns the QAction which was clicked. So you could check which one is returned and act on it, like:
Alternatively, when you create the QActions you could attach a slot to its triggered signal:
connect(hideAction, &QAction::triggered, this, []() { qInfo() << "Hide"; } );