def show_error(message, title=None, parent=None): if not title: title = gettext("An Error Occurred") # QErrorMessage().showMessage(message) # message_box = QMessageBox() # message_box.setIcon(QMessageBox.Critical) # message_box.setText(message) # message_box.exec_() QMessageBox.critical(QParent(parent), title, message)
def show_warning(message, title=None, parent=None): if not title: title = gettext("Warning") QMessageBox.warning(QParent(parent), title, message)