Created
September 15, 2021 10:53
-
-
Save torarnv/0df0e8f1303cccf74e16e3d566ed82a2 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git c/src/widgets/kernel/qwidget.cpp i/src/widgets/kernel/qwidget.cpp | |
index fcb18d7c187..b7db1c56b0c 100644 | |
--- c/src/widgets/kernel/qwidget.cpp | |
+++ i/src/widgets/kernel/qwidget.cpp | |
@@ -8488,8 +8488,10 @@ bool QWidgetPrivate::close() | |
// Close native widgets via QWindow::close() in order to run QWindow | |
// close code. The QWidget-specific close code in handleClose() will | |
// in this case be called from the Close event handler in QWidgetWindow. | |
- if (QWindow *widgetWindow = windowHandle()) | |
- return widgetWindow->close(); | |
+ if (QWindow *widgetWindow = windowHandle()) { | |
+ if (widgetWindow->handle()) | |
+ return widgetWindow->close(); | |
+ } | |
return handleClose(QWidgetPrivate::CloseWithEvent); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment