Replaced MessageBox with QMessageBox.
Cleaned code.