gui.py 731 B

12345678910111213141516171819202122
  1. # This Python file uses the following encoding: utf-8
  2. # @author runhey
  3. # github https://github.com/runhey
  4. from module.gui.context.add import Add
  5. from module.gui.context.process_manager import ProcessManager
  6. from module.gui.fluent_app import FluentApp
  7. if __name__ == "__main__":
  8. # 检查是不是以管理员身份运行,脚本启动的其他进程会继承权限
  9. # 启动一个UI交互的线程,因为信号槽不可跨进程
  10. # 后面选择注入上下文快
  11. app = FluentApp()
  12. add = Add()
  13. process_manager = ProcessManager()
  14. process_manager.create_all()
  15. app.set_context_property(add, 'add')
  16. app.set_context_property(process_manager, 'process_manager')
  17. # 启动一个GUI
  18. app.run()