Override DockWidget::setParentView() instead of relying on QEvent
So it works with non-Qt frontends too.
This commit is contained in:
@@ -71,7 +71,6 @@ void DockWidget::init()
|
||||
{
|
||||
d->init();
|
||||
view()->setAttribute(Qt::WA_PendingMoveEvent, false);
|
||||
view()->d->parentChanged.connect(&Private::onParentChanged, d);
|
||||
}
|
||||
|
||||
void DockWidget::addDockWidgetAsTab(DockWidget *other, InitialOption option)
|
||||
@@ -513,6 +512,12 @@ Controllers::DockWidget *DockWidget::byName(const QString &uniqueName)
|
||||
return DockRegistry::self()->dockByName(uniqueName);
|
||||
}
|
||||
|
||||
void DockWidget::setParentView(View *parent)
|
||||
{
|
||||
Controller::setParentView(parent);
|
||||
d->onParentChanged();
|
||||
}
|
||||
|
||||
bool DockWidget::skipsRestore() const
|
||||
{
|
||||
return d->layoutSaverOptions & LayoutSaverOption::Skip;
|
||||
|
||||
Reference in New Issue
Block a user