emv_upper.py 810 B

1234567891011121314151617181920212223242526272829303132333435
  1. """
  2. @文件 :EmvUpper.py
  3. @时间 :2021/12/08 16:32:57
  4. @作者 :None
  5. @版本 :1.0
  6. @说明 :EmvUpper程序主入口
  7. """
  8. from sys import exit
  9. from controller.emv_ctl import EmvControll
  10. from utils.globalvar import SD
  11. from utils.qt import QApplication, QCoreApplication, Qt, QStyleFactory
  12. def emv_start():
  13. # 适配分辨率
  14. if hasattr(Qt, 'AA_EnableHighDpiScaling'):
  15. QCoreApplication.setAttribute(Qt.AA_EnableHighDpiScaling, True)
  16. if hasattr(Qt, 'AA_UseHighDpiPixmaps'):
  17. QCoreApplication.setAttribute(Qt.AA_UseHighDpiPixmaps, True)
  18. SD.HIGH_DPI = 0
  19. else:
  20. SD.HIGH_DPI = 1
  21. main_connrtoller = EmvControll()
  22. QApplication.setStyle(QStyleFactory.create("windows"))
  23. exit(main_connrtoller.run())
  24. if __name__ == "__main__":
  25. emv_start()