Use QDialog::show() instead of exec()
QDialog::exec() starts a nested eventloop, which could cause all sort of issues; better use show() and make the code async.
QDialog::exec() starts a nested eventloop, which could cause all sort of issues; better use show() and make the code async.