38 lines
900 B
Python
Raw Normal View History

2025-09-06 16:06:30 +08:00
import sys
import os
from pathlib import Path
from PySide6.QtWidgets import QApplication
from app.view import Window
from app.scheduler_manager import scheduler
def main():
# # 设置插件路径 - 关键修复
# if getattr(sys, 'frozen', False):
# # 打包后的路径
# base_dir = Path(sys._MEIPASS)
# else:
# # 开发环境路径
# base_dir = Path(__file__).parent
# # 设置Qt插件路径
# os.environ['QT_PLUGIN_PATH'] = str(base_dir / 'plugins')
# 启动队列调度器
scheduler.start_queue_scheduler()
# 创建Qt应用
app = QApplication(sys.argv)
window = Window()
window.show()
window.setMicaEffectEnabled(True)
# 启动事件循环
exit_code = app.exec()
# 停止队列调度器
scheduler.stop_queue_scheduler()
sys.exit(exit_code)
if __name__ == "__main__":
main()