feat: 添加main()函数作为应用入口
在main_window.py末尾添加main()函数用于启动应用
This commit is contained in:
@@ -584,3 +584,17 @@ class NavigationButton(QPushButton):
|
|||||||
if icon_path:
|
if icon_path:
|
||||||
self.setIcon(QIcon(icon_path))
|
self.setIcon(QIcon(icon_path))
|
||||||
self.setIconSize(QSize(20, 20))
|
self.setIconSize(QSize(20, 20))
|
||||||
|
|
||||||
|
|
||||||
|
def main():
|
||||||
|
"""
|
||||||
|
应用程序入口
|
||||||
|
|
||||||
|
初始化并显示主窗口
|
||||||
|
"""
|
||||||
|
app = QApplication(sys.argv)
|
||||||
|
|
||||||
|
window = MainWindow()
|
||||||
|
window.show()
|
||||||
|
|
||||||
|
sys.exit(app.exec())
|
||||||
|
|||||||
Reference in New Issue
Block a user