diff --git a/src/main.py b/src/main.py index 909ce74..efb698c 100644 --- a/src/main.py +++ b/src/main.py @@ -3,7 +3,7 @@ import sys import os import platform from PyQt6.QtWidgets import QApplication -from PyQt6.QtGui import QIcon +from PyQt6.QtGui import QIcon, QImageReader from teletext.ui import MainWindow def resource_path(relative_path): @@ -24,7 +24,14 @@ def main(): ctypes.windll.shell32.SetCurrentProcessExplicitAppUserModelID(myappid) app = QApplication(sys.argv) + app.setApplicationName("TeletextEditor") + app.setOrganizationName("DanielDybing") + app.setDesktopFileName("TeletextEditor") # Helps Linux DEs group windows + # Debug Image Formats + supported_formats = [str(fmt, 'utf-8') for fmt in QImageReader.supportedImageFormats()] + print(f"DEBUG: Supported Image Formats: {supported_formats}") + # Set App Icon icon_path = resource_path("app_icon.png") print(f"DEBUG: Looking for icon at: {icon_path}") @@ -33,6 +40,13 @@ def main(): print("DEBUG: Icon file found.") app_icon = QIcon(icon_path) app.setWindowIcon(app_icon) + + # Verify icon loaded + if app_icon.isNull(): + print("DEBUG: QIcon is null (failed to load image data)") + else: + print(f"DEBUG: QIcon loaded. Available sizes: {app_icon.availableSizes()}") + else: print("DEBUG: Icon file NOT found.")