moment/harmonyqml/app.py
miruka 12ce4cdb30 Rework startup and Application-Engine relation
- Application and Engine will be started by __init__.run() independently
- Exiting app will disconnect clients
- Signals like SIGINT (Ctrl-C) are now handled for proper exit
2019-05-01 01:23:38 -04:00

23 lines
588 B
Python

# Copyright 2019 miruka
# This file is part of harmonyqml, licensed under GPLv3.
from typing import List, Optional
from PyQt5.QtGui import QGuiApplication
from . import __about__
class Application(QGuiApplication):
def __init__(self, args: Optional[List[str]] = None) -> None:
self.debug = False
if args and "--debug" in args:
del args[args.index("--debug")]
self.debug = True
super().__init__(args or [])
self.setApplicationName(__about__.__pkg_name__)
self.setApplicationDisplayName(__about__.__pretty_name__)