def error(self, message): msg = QMessageBox() msg.setText(message) msg.setStandardButtons(QMessageBox.Ok) out = msg.exec_()