improve QMessageBox function