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.