Advertisement

03.13.2008 at 02:56AM PDT, ID: 23237884 | Points: 500
[x]
Attachment Details

dynamic menu with endless possible submenus

I am creating a Dynamic Menu, like for a menu bar. It creates itself according to what is read from a config file.
so if for example in my configuration file i have "Vehicles/4Wheel/Cars"

My Menu should look like

Products
Vehicles -----4Wheel ------ Cars

so there opens 2 Submenus from the root menu.

I am wondering how is the best way to keep track of this. As of now i only managed to do it for having one sub menu by:
std::map< QString, QMenu* > m_SubMenus;
By keeping track of my Menus. QString is the name of the Action under the root menu, like Vehicles in the above example.

I need to keep track of them since the user can modify these menus at runtime.

Any good idea?
 
 
 
Expert Comment by Infinity08:

All comments and solutions are available to Premium Service Members only. Start your 7-day free trial to view the solution to this question.

Already a member? Login to view this solution.

 
 
Expert Comment by evilrix:

All comments and solutions are available to Premium Service Members only. Start your 7-day free trial to view the solution to this question.

Already a member? Login to view this solution.

 
 
Expert Comment by evilrix:

All comments and solutions are available to Premium Service Members only. Start your 7-day free trial to view the solution to this question.

Already a member? Login to view this solution.

 
 
Expert Comment by enricod75:

All comments and solutions are available to Premium Service Members only. Start your 7-day free trial to view the solution to this question.

Already a member? Login to view this solution.

 
 
20081119-EE-VQP-46 / EE_QW_2_20070628