37 lines
868 B
Python
37 lines
868 B
Python
#!/usr/bin/env python3
|
|
"""
|
|
测试主窗口
|
|
"""
|
|
|
|
import sys
|
|
import traceback
|
|
|
|
try:
|
|
print("开始导入...", flush=True)
|
|
|
|
print("1. 导入customtkinter...", flush=True)
|
|
import customtkinter as ctk
|
|
print(" 成功!", flush=True)
|
|
|
|
print("2. 设置主题...", flush=True)
|
|
ctk.set_appearance_mode("dark")
|
|
ctk.set_default_color_theme("blue")
|
|
print(" 成功!", flush=True)
|
|
|
|
print("3. 导入MainWindow...", flush=True)
|
|
from gui.main_window import MainWindow
|
|
print(" 成功!", flush=True)
|
|
|
|
print("4. 创建主窗口...", flush=True)
|
|
app = MainWindow()
|
|
print(" 成功!", flush=True)
|
|
|
|
print("5. 启动主循环...", flush=True)
|
|
app.mainloop()
|
|
print(" 完成!", flush=True)
|
|
|
|
except Exception as e:
|
|
print(f"\n错误: {e}", flush=True)
|
|
traceback.print_exc()
|
|
sys.exit(1)
|