c++ - Qt creator, insert custom menu at specified place into menu bar -
I have created a menu bar and some menus with the Qt constructor from one of the menus to QActionGroup
The features were to be coded to be used now it is easy to add my custom menus to the menu bar:
printMenu = menuBar () - & gt; Admany (tr ("& Print"));
But in the last position of my menu menu bar how do I add my menu to a specific location? (For example, second place after file menu)
Greetings
Use in Combine with
For example, if you want to dynamically insert the "Print" menu in the first place from the "Help" menu, then you can do something like this:
< Code> QMenu * printMenu = new QMenu (tr ("& Print")); Menu Bar () - & gt; Insert Menu (ui- & gt; Menu Help-> Menu Action (), Print Menu);
Comments
Post a Comment