moment/harmonyqml/app.py
miruka 4f9a47027c matrix-nio backend start, QGuiApplication class
- Started work on the matrix-nio backend, which will be used instead
  of matrix-python-sdk for greater control and cleaner design

- Have an Application (QGuiApplication) class to habdle argument parsing
  and setting some Qt properties like application name
2019-04-11 13:22:43 -04:00

27 lines
714 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:
try:
args.index("--debug") # type: ignore
debug = True
except (AttributeError, ValueError):
debug = False
super().__init__(args or [])
self.setApplicationName(__about__.__pkg_name__)
self.setApplicationDisplayName(__about__.__pretty_name__)
from .engine import Engine
engine = Engine(self, debug=debug)
engine.show_window()