Fixes #15310
If this is an acceptable approach then this shall be adapted (eventually in this PR) to other areas where we use QDialog.exec()
.
The synchronous QDialog.exec()
call interacts badly with multiwallet (especially unloading wallets).
From the Qt docs:
Note: Avoid using this function; instead, use open(). Unlike exec(), open() is asynchronous, and does not spin an additional event loop. This prevents a series of dangerous bugs from happening (e.g. deleting the dialog’s parent while the dialog is open via exec()). When using open() you can connect to the finished() signal of QDialog to be notified when the dialog is closed.