24 lines
525 B
Python
24 lines
525 B
Python
''' app/init.py '''
|
|
import sys
|
|
from PyQt6.QtWidgets import QApplication
|
|
from .ui.main_window import MainWindow
|
|
from .utility.config import AppConfig
|
|
|
|
|
|
def run() -> int:
|
|
"""
|
|
Initializes the application and runs it.
|
|
|
|
Returns:
|
|
int: The exit status code.
|
|
"""
|
|
app: QApplication = QApplication(sys.argv)
|
|
AppConfig.initialize()
|
|
|
|
window: MainWindow = MainWindow()
|
|
window.show()
|
|
exitcode = app.exec()
|
|
print("Saving configuration")
|
|
AppConfig.finalize()
|
|
return sys.exit(exitcode)
|