Add missing parent for messagebox and other popups

Unparented popups can easily get lost in backround, but they still block top level event loop when run with ::exec() thus preventing interactions with main window.  This mainly happens on wayland. Setting the parent ensures they are always kept on top and reasonably positioned.
This commit is contained in:
Karliss
2025-03-13 12:00:17 +02:00
committed by Chris Hennes
parent 223f12caf7
commit 42790475d6
22 changed files with 33 additions and 24 deletions

View File

@@ -565,7 +565,7 @@ void DlgMacroExecuteImp::onToolbarButtonClicked()
.GetParameterGroupByPath("User parameter:BaseApp/Preferences/Macro")
->GetBool("ShowWalkthroughMessage", true);
if (showAgain) {
QMessageBox msgBox;
QMessageBox msgBox(this);
QAbstractButton* doNotShowAgainButton =
msgBox.addButton(tr("Do not show again"), QMessageBox::YesRole);
msgBox.setText(tr("Guided Walkthrough"));