qtquick: Fix close() not hidding the widget

QtQuick will emit a "visibleChanged(true)" when setting nullptr,
which we need to inhibit so it behaves like QtWidgets.
This commit is contained in:
Sergio Martins
2021-05-02 11:05:52 +01:00
parent ba0d515330
commit bbbce6f694
4 changed files with 61 additions and 18 deletions

View File

@@ -776,7 +776,7 @@ void DockWidgetBase::onCloseEvent(QCloseEvent *e)
{
e->accept(); // By default we accept, means DockWidget closes
if (d->widget)
qApp->sendEvent(d->widget, e); // Give a chancefor the widget to ignore
qApp->sendEvent(d->widget, e); // Give a chance for the widget to ignore
if (e->isAccepted())
d->close();