In normal Python (3.x) we always use showerror() from the tkinter module to display an error message but what should I do in PyQt5 to display exactly the same message type a
Don't forget to call .exec_() to display the error:
.exec_()
from PyQt5.QtWidgets import QMessageBox msg = QMessageBox() msg.setIcon(QMessageBox.Critical) msg.setText("Error") msg.setInformativeText('More information') msg.setWindowTitle("Error") msg.exec_()