Make use of QApplication::exec()

Instead of QDialog::exec(). That's the proper way.