-
-
Notifications
You must be signed in to change notification settings - Fork 3
/
errorhandler.py
26 lines (24 loc) · 940 Bytes
/
errorhandler.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
from PyQt5.QtCore import Qt
from PyQt5.QtWidgets import QDialog
from errorhandler_ui import Ui_Error
class ShowError(QDialog,Ui_Error):
def __init__(self,error,message,parent=None,geckocode=False):
super().__init__(parent)
self.setWindowFlag(Qt.WindowContextHelpButtonHint,False)
self.setupUi(self)
if(not geckocode):
self.ErrorTitle.setText(error)
self.ErrorMessage.setText(message)
self.ErrorClose.clicked.connect(self.close)
else:
self.clicked = False
self.ErrorTitle_GC.setText(error)
self.ErrorMessage_GC.setText(message)
self.ErrorClose_GC.clicked.connect(self.close)
self.ErrorCreate_GC.clicked.connect(self.GeckoCodeCreate)
self.MainWidget.setCurrentIndex(1)
self.show()
self.exec()
def GeckoCodeCreate(self):
self.clicked = True
self.close()