-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathhandler.py
More file actions
32 lines (27 loc) · 1021 Bytes
/
handler.py
File metadata and controls
32 lines (27 loc) · 1021 Bytes
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
27
28
29
30
31
32
# coding=utf-8
from packages import *
import cfg
class messageHandler(QMessageBox):
def __init__(self, title="", text="", traceback=""):
super(messageHandler, self).__init__()
self.title_ = title
self.text_ = text
self.message = traceback
def showwarning(self):
self.setWindowTitle(self.title_)
self.setWindowIcon(QIcon(cfg.icon1))
self.setIcon(QMessageBox.Warning)
self.setStandardButtons(QMessageBox.Ok)
self.setAttribute(Qt.WA_DeleteOnClose)
self.setFont(QFont("ZHSRXT-GBK", 12))
self.setText(self.text_ + str(self.message))
self.exec_()
def showinfo(self):
self.setWindowTitle(self.title_)
self.setWindowIcon(QIcon(cfg.icon1))
self.setIcon(QMessageBox.Information)
self.setStandardButtons(QMessageBox.Ok)
self.setAttribute(Qt.WA_DeleteOnClose)
self.setFont(QFont("ZHSRXT-GBK", 12))
self.setText(self.text_ + str(self.message))
self.exec_()