diff --git a/Source/Core/DolphinQt/QtUtils/ModalMessageBox.cpp b/Source/Core/DolphinQt/QtUtils/ModalMessageBox.cpp index 8cc23b613b..a6b06bdf09 100644 --- a/Source/Core/DolphinQt/QtUtils/ModalMessageBox.cpp +++ b/Source/Core/DolphinQt/QtUtils/ModalMessageBox.cpp @@ -6,13 +6,14 @@ #include -ModalMessageBox::ModalMessageBox(QWidget* parent) : QMessageBox(parent) +ModalMessageBox::ModalMessageBox(QWidget* parent) + : QMessageBox(parent != nullptr ? parent->window() : nullptr) { setWindowModality(Qt::WindowModal); - setWindowFlags(windowFlags() & ~Qt::WindowContextHelpButtonHint); + setWindowFlags(Qt::Sheet | Qt::WindowTitleHint | Qt::CustomizeWindowHint); // No parent is still preferable to showing a hidden parent here. - if (parent != nullptr && !parent->isVisible()) + if (parent != nullptr && !parent->window()->isVisible()) setParent(nullptr); }