Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
[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?
-
"Google.":http://lmgtfy.com/?q=qt+creating+main+window+menu
"First hit.":http://doc.qt.nokia.com/4.7-snapshot/designer-creating-mainwindows.html
-
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.