Files
Teletext-Editor/src/main.py

32 lines
779 B
Python
Raw Normal View History

import sys
2026-01-13 18:23:00 +01:00
import os
from PyQt6.QtWidgets import QApplication
2026-01-13 18:23:00 +01:00
from PyQt6.QtGui import QIcon
from teletext.ui import MainWindow
2026-01-13 18:23:00 +01:00
def resource_path(relative_path):
""" Get absolute path to resource, works for dev and for PyInstaller """
try:
# PyInstaller creates a temp folder and stores path in _MEIPASS
base_path = sys._MEIPASS
except Exception:
base_path = os.path.abspath(".")
return os.path.join(base_path, relative_path)
def main():
app = QApplication(sys.argv)
2026-01-13 18:23:00 +01:00
# Set App Icon
icon_path = resource_path("app_icon.png")
if os.path.exists(icon_path):
app.setWindowIcon(QIcon(icon_path))
window = MainWindow()
window.show()
sys.exit(app.exec())
if __name__ == "__main__":
main()