Introduce InitialOption struct
addDockWidget() received a AddingOption enumerator. But that enum isn't enough, as we also want to be able to specify an initial QSize. So, instead of adding yet another parameter to addDockWidget(), we create a struct to old those "initial settings". Implies a minor source break, but trivial to fix in user code, just rename the enumerator. Honouring preferredSize will be a followup. Needed for issue #95
This commit is contained in:
@@ -157,7 +157,7 @@ DockWidgetBase::~DockWidgetBase()
|
||||
delete d;
|
||||
}
|
||||
|
||||
void DockWidgetBase::addDockWidgetAsTab(DockWidgetBase *other, AddingOption addingOption)
|
||||
void DockWidgetBase::addDockWidgetAsTab(DockWidgetBase *other, InitialOption option)
|
||||
{
|
||||
qCDebug(addwidget) << Q_FUNC_INFO << other;
|
||||
if (other == this) {
|
||||
@@ -202,7 +202,7 @@ void DockWidgetBase::addDockWidgetAsTab(DockWidgetBase *other, AddingOption addi
|
||||
}
|
||||
|
||||
other->setParent(nullptr);
|
||||
frame->addWidget(other, addingOption);
|
||||
frame->addWidget(other, option);
|
||||
}
|
||||
|
||||
void DockWidgetBase::addDockWidgetToContainingWindow(DockWidgetBase *other, Location location, DockWidgetBase *relativeTo)
|
||||
|
||||
Reference in New Issue
Block a user