-
Notifications
You must be signed in to change notification settings - Fork 34
/
main.py
43 lines (32 loc) · 1.34 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
import logging
from frame.appfacade import AppFacade
from frame.constant import Constant
from frame.vo.module_vo import ModuleVO
from yyds.screen.index_window_mediator import IndexWindowMediator
app: AppFacade = AppFacade.getInstance()
app1: AppFacade = AppFacade.getInstance()
LOG = logging.getLogger("main.py")
def print_hi(name):
# 在下面的代码行中使用断点来调试脚本。
print(f'Hi, {name}') # 按 Ctrl+F8 切换断点。
def main():
app.sendNotification(AppFacade.STARTUP, "hello puremvc")
module: ModuleVO = ModuleVO(IndexWindowMediator, "pure switchview success")
# module: ModuleVO = ModuleVO(MainWindowMediator)
app.sendNotification(Constant.SWITCH_QWIDGET, module)
if __name__ == '__main__':
import sys
from PyQt5.QtWidgets import QApplication
from PyQt5.QtCore import Qt
# 解决界面模糊,缩放比例问题
QApplication.setHighDpiScaleFactorRoundingPolicy(Qt.HighDpiScaleFactorRoundingPolicy.PassThrough)
# 适应高DPI设备
QApplication.setAttribute(Qt.AA_EnableHighDpiScaling)
# 解决图片在不同分辨率显示模糊问题
QApplication.setAttribute(Qt.AA_UseHighDpiPixmaps)
# 更换windows风格
# QApplication.setStyle(QStyleFactory.create('windows'))
qApp = QApplication(sys.argv)
print_hi('PyCharm')
main()
sys.exit(qApp.exec_())