-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathapp.py
More file actions
38 lines (26 loc) · 848 Bytes
/
Copy pathapp.py
File metadata and controls
38 lines (26 loc) · 848 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
import ctypes
import os
import sys
from PySide6.QtGui import QIcon
from PySide6.QtWidgets import QApplication
from ui.main_window import MainWindow
# noinspection PyUnresolvedReferences
def set_windows_taskbar_icon(icon_path):
try:
ctypes.windll.shell32.SetCurrentProcessExplicitAppUserModelID(
"com.juliangrtz.ios-re-lab"
)
ctypes.windll.user32.LoadImageW(0, icon_path, 1, 0, 0, 0x10)
except Exception as e:
print(f"Warning: Could not set taskbar icon: {e}")
def main():
app = QApplication(sys.argv)
icon_path = os.path.join("img", "apple.ico")
app.setWindowIcon(QIcon(icon_path))
if sys.platform.startswith("win"):
set_windows_taskbar_icon(icon_path)
window = MainWindow()
window.show()
sys.exit(app.exec())
if __name__ == "__main__":
main()