21 lines
450 B
Python
21 lines
450 B
Python
"""QApplication bootstrap."""
|
|
|
|
from __future__ import annotations
|
|
|
|
import sys
|
|
|
|
from PySide6.QtWidgets import QApplication
|
|
|
|
from .config import AppConfig
|
|
from .ui.main_window import MainWindow
|
|
|
|
|
|
def run(config: AppConfig, folder: str | None = None) -> int:
|
|
app = QApplication(sys.argv)
|
|
app.setApplicationName("HVideoTool")
|
|
window = MainWindow(config)
|
|
window.show()
|
|
if folder:
|
|
window.open_path(folder)
|
|
return app.exec()
|