Re: Creating a popup toolbox
I'm not sure what you're exactly trying to do, but if it's only a set of menu options to choose from then you don't need to inherit anything. Just create a QMenu (of course you can inherit it as well, that's your choice) and add actions to it using addAction() method (there are few variants of that method, the simplest taking a QAction*).
Re: Creating a popup toolbox
No, thats not what I'm trying to do. What I'm trying to do is to create a context menu that is actually a QToolbox....so that instead of having your typical sub-menus like you would with a standard QMenu, you have collapsible sections.
Re: Creating a popup toolbox
Ok, I understand now. You need to subclass QMenu then. You may then try to embed a QToolBox inside it (by a parent-child relation, not by inheritance - you can't inherit from both QMenu and QToolBox as they both inherit QObject and multiple inheritance of QObject is not allowed).
Re: Creating a popup toolbox
Not really sure how to approach "embedding" it. Could it be as easy as just calling "setParent"?
Re: Creating a popup toolbox
Code:
MyMenu
::MyMenu(...
) : QMenu(...
){ l->addWidget(tb);
//...
}