[Solved] How to add menu item and trigger action?
-
I would like to build a menu bar for a GUI desktop application in QT.
In the designer, how can I add menu bar and menu item and how to trigger the action of the menu item?
Is there any walkthrough tutorial?
-
-
to set up your environment using qt Creator just follow this wizard :
QT Creator Manual > Creating a Qt C++ Applicationbut choose for QMainWindow instead of QWidget
-
Menu items have added, how can I trigger the code?
-
Right mouse button in action editor...
then "go to slot"
and choose the signal you want.