Port LayoutWidget away from QWidget
DropArea and MDILayout now inherit from it, in addittion to QWidget. This mean DropArea can now be split into View/Controller alone, without having to port LayoutWidget and MDILayout in the same commit, which would be hard to review.
This commit is contained in:
@@ -154,11 +154,8 @@ bool Frame_qtwidgets::event(QEvent *e)
|
||||
return QWidget::event(e);
|
||||
|
||||
if (e->type() == QEvent::ParentChange) {
|
||||
if (auto layoutWidget = qobject_cast<LayoutWidget *>(QWidget::parentWidget())) {
|
||||
m_controller->setLayoutWidget(layoutWidget);
|
||||
} else {
|
||||
m_controller->setLayoutWidget(nullptr);
|
||||
}
|
||||
auto p = parentView();
|
||||
m_controller->setLayoutWidget(p ? p->asLayoutWidget() : nullptr);
|
||||
}
|
||||
|
||||
return QWidget::event(e);
|
||||
|
||||
Reference in New Issue
Block a user