import signal import sys import traceback from PyQt6.QtWidgets import QApplication from core.app import StickyNoteApp def main() -> int: signal.signal(signal.SIGINT, signal.SIG_DFL) app = QApplication(sys.argv) window = StickyNoteApp() window.show() try: return app.exec() except KeyboardInterrupt: try: window.safe_exit() except Exception: traceback.print_exc() return 0 except SystemExit: return 0 except Exception: traceback.print_exc() return 1 if __name__ == "__main__": raise SystemExit(main())