feat: 添加main()函数作为应用入口

在main_window.py末尾添加main()函数用于启动应用
This commit is contained in:
congsh
2026-02-12 13:08:37 +08:00
parent 92a258350a
commit bb27db586d

View File

@@ -584,3 +584,17 @@ class NavigationButton(QPushButton):
if icon_path:
self.setIcon(QIcon(icon_path))
self.setIconSize(QSize(20, 20))
def main():
"""
应用程序入口
初始化并显示主窗口
"""
app = QApplication(sys.argv)
window = MainWindow()
window.show()
sys.exit(app.exec())