def main_window(app, translator, cntlr=None):
"""Run the main exectuable."""
from PyQt5.QtCore import QSize
from PyQt5.QtGui import QIcon
from scctool.controller import MainController
from scctool.view.main import MainWindow
try:
"""Run the main program."""
icon = QIcon()
icon.addFile(getAbsPath('src/scct.ico'), QSize(32, 32))
icon.addFile(getAbsPath('src/scct.png'), QSize(256, 256))
app.setWindowIcon(icon)
if cntlr is None:
cntlr = MainController()
MainWindow(cntlr, app, translator)
logger.info("Starting...")
return cntlr
except Exception as e:
logger.exception("message")
raise
评论列表
文章目录