mirror of
https://github.com/hyb-oyqq/FRAISEMOE-Addons-Installer-NEXT.git
synced 2025-12-16 20:10:28 +00:00
- 在 Main.py 中初始化隐私协议管理器,并在程序启动前显示隐私协议对话框 - 在 core/__init__.py 中添加 PrivacyManager 的引用 - 在 ui_manager.py 中实现关于菜单和隐私协议相关功能,包括: - 创建关于按钮和菜单 - 添加隐私协议子菜单 - 实现撤回隐私协议同意并重启软件的功能 - 优化菜单样式和字体加载
21 lines
732 B
Python
21 lines
732 B
Python
import sys
|
|
from PySide6.QtWidgets import QApplication
|
|
from main_window import MainWindow
|
|
from core.privacy_manager import PrivacyManager
|
|
|
|
if __name__ == "__main__":
|
|
app = QApplication(sys.argv)
|
|
|
|
# 初始化隐私协议管理器
|
|
privacy_manager = PrivacyManager()
|
|
|
|
# 显示隐私协议对话框(仅在首次运行或用户未同意时显示)
|
|
if not privacy_manager.show_privacy_dialog():
|
|
print("用户未同意隐私协议,程序退出")
|
|
sys.exit(0) # 如果用户不同意隐私协议,退出程序
|
|
|
|
# 用户已同意隐私协议,继续启动程序
|
|
print("隐私协议已同意,启动主程序")
|
|
window = MainWindow()
|
|
window.show()
|
|
sys.exit(app.exec()) |