-
Notifications
You must be signed in to change notification settings - Fork 10
/
main.py
50 lines (39 loc) · 1.29 KB
/
main.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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
import ctypes
import sys
from PyQt5.QtWidgets import QApplication, QDialog
from callAdd import AddForm
from callEnhance import EnhanceForm
from callMerge import MergeForm
from callSplit import SplitForm
from PDFTools import Ui_Dialog # or import *
class MyForm(QDialog):
def __init__(self):
super().__init__()
self.ui = Ui_Dialog()
self.ui.setupUi(self)
self.ui.pushButton_add.clicked.connect(self.add_Window)
self.ui.pushButton_enhance.clicked.connect(self.enhance_Window)
self.ui.pushButton_split.clicked.connect(self.split_Window)
self.ui.pushButton_merge.clicked.connect(self.merge_Window)
self.show()
def add_Window(self):
self.w1 = AddForm()
self.w1.show()
# self.hide()
def enhance_Window(self):
self.w2 = EnhanceForm()
self.w2.show()
def split_Window(self):
self.w3 = SplitForm()
self.w3.show()
def merge_Window(self):
self.w4 = MergeForm()
self.w4.show()
if __name__ == "__main__":
app = QApplication(sys.argv)
# set taskbar icon
myappid = 'mycompany.myproduct.subproduct.version' # arbitrary string
ctypes.windll.shell32.SetCurrentProcessExplicitAppUserModelID(myappid)
w = MyForm()
w.show()
sys.exit(app.exec_())