I have called QMessageBox() like this:
class Main(QDialog):
def __init__(self):
self.view = QUiLoader().load("app.ui", self)
self.view.show()
self.functionA()
....
functionA():
try:
....
except Exception:
QMessageBox.critical(self, "Error", "System Failure")
def main():
app = QApplication(sys.argv)
a = Main()
sys.exit(app.exec_())
if __name__ == "__main__"
main()
When i click OK button of Message box it also closes my Dialog. How to avoid this ?