diff options
Diffstat (limited to 'src/widgets/kernel/qwidget_qpa.cpp')
-rw-r--r-- | src/widgets/kernel/qwidget_qpa.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/widgets/kernel/qwidget_qpa.cpp b/src/widgets/kernel/qwidget_qpa.cpp index 8a6ceac526..a7dd6bf01c 100644 --- a/src/widgets/kernel/qwidget_qpa.cpp +++ b/src/widgets/kernel/qwidget_qpa.cpp @@ -169,6 +169,10 @@ void QWidget::destroy(bool destroyWindow, bool destroySubWindows) if (this == QApplicationPrivate::active_window) QApplication::setActiveWindow(0); + if (QWidget::mouseGrabber() == this) + releaseMouse(); + if (QWidget::keyboardGrabber() == this) + releaseKeyboard(); setAttribute(Qt::WA_WState_Created, false); |