From: Luis G. <lui...@us...> - 2010-10-25 22:30:06
|
On Mon, Oct 25, 2010 at 11:28 PM, Tim E. Real <ter...@ro...> wrote: > EditToolBar::EditToolBar(QWidget* parent, int tools, const char*) > : QToolBar(tr("Edit Tools"), parent) > { > QActionGroup* action = new QActionGroup(parent); > ... > ... > // Does not take ownership of 'action'. So 'action' needs a parent. > addActions(action->actions()); > > } > Yup, QAction's are not widgets, but some widgets base their aspect in a set of them. It is a widespread practice to make QAction children of the main widget, usually a QMainWindow, so they can be reused in toolbars, menus, etc. |