Remove a dock widget from the layout before adding as tab

So the layout can grow first and not complain there's not enough
space.

Fixes fuzzer test-case 3.json.
The warning was: "Constraints not honoured" in Item::onLayoutRequest()
This commit is contained in:
Sergio Martins
2019-10-15 12:51:49 +01:00
parent fe4627280e
commit 92bbe4d4f7
2 changed files with 3 additions and 1 deletions

View File

@@ -154,6 +154,7 @@ void DockWidgetBase::addDockWidgetAsTab(DockWidgetBase *other)
}
Q_ASSERT(frame);
other->setParent(nullptr);
frame->addWidget(other);
}