26 lines
593 B
Python
26 lines
593 B
Python
![]() |
''' app/init.py '''
|
||
|
import sys
|
||
|
from PyQt6.QtWidgets import QApplication
|
||
|
from .ui.main_window import MainWindow
|
||
|
from .utils.config import AppConfig
|
||
|
from cpdctrl.utility.config_file import ConfigFile
|
||
|
|
||
|
|
||
|
def run() -> int:
|
||
|
"""
|
||
|
Initializes the application and runs it.
|
||
|
|
||
|
Returns:
|
||
|
int: The exit status code.
|
||
|
"""
|
||
|
app: QApplication = QApplication(sys.argv)
|
||
|
AppConfig.initialize()
|
||
|
cf = ConfigFile(AppConfig.MAIN_CFG)
|
||
|
print(cf.values)
|
||
|
cf.set("key", "value")
|
||
|
|
||
|
window: MainWindow = MainWindow()
|
||
|
window.show()
|
||
|
cf.save()
|
||
|
return sys.exit(app.exec())
|