4f9a47027c
- 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
27 lines
714 B
Python
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()
|