import sys import os from PyQt6.QtWidgets import QApplication from ui.main_window import MainWindow def get_resource_path(relative_path): if hasattr(sys, '_MEIPASS'): return os.path.join(sys._MEIPASS, relative_path) return os.path.join(os.path.abspath("."), relative_path) def main(): app = QApplication(sys.argv) # Load stylesheet style_path = get_resource_path(os.path.join("resources", "style.qss")) try: with open(style_path, "r") as f: app.setStyleSheet(f.read()) except FileNotFoundError: print(f"Warning: style.qss not found at {style_path}, using default styling.") window = MainWindow() window.show() sys.exit(app.exec()) if __name__ == "__main__": main()