fix(gui): 同时设置app和window图标确保显示
This commit is contained in:
@@ -1448,8 +1448,11 @@ def main() -> int:
|
|||||||
app.setFont(QFont("Segoe UI", 10))
|
app.setFont(QFont("Segoe UI", 10))
|
||||||
icon_path = program_root() / "x.png"
|
icon_path = program_root() / "x.png"
|
||||||
if icon_path.exists():
|
if icon_path.exists():
|
||||||
app.setWindowIcon(QIcon(str(icon_path)))
|
icon = QIcon(str(icon_path))
|
||||||
|
app.setWindowIcon(icon)
|
||||||
window = MainWindow()
|
window = MainWindow()
|
||||||
|
if icon_path.exists():
|
||||||
|
window.setWindowIcon(QIcon(str(icon_path)))
|
||||||
window.show()
|
window.show()
|
||||||
return app.exec()
|
return app.exec()
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user