使用 ProgressInfoBar 替代原有方案

This commit is contained in:
2025-05-26 19:42:20 +08:00
parent e3fde36390
commit 50a360aca2
5 changed files with 66 additions and 95 deletions

View File

@@ -71,6 +71,7 @@ class DTGWorker(QObject):
class ARGWorker(QObject):
finished = Signal()
error = Signal(str, str)
info = Signal(str, str)
def __init__(self, input_filepath: str, output_filepath: str, output_filename: str, disable_cc: bool = False):
super().__init__()
@@ -81,10 +82,10 @@ class ARGWorker(QObject):
def run(self):
try:
excel = ExcelReader(self.input_filepath, self.disable_compatibility_check)
excel = ExcelReader(self.input_filepath, self.disable_compatibility_check, self.info.emit)
excel.run()
doc = DocxWriter(self.output_filepath, self.output_filename, excel)
doc = DocxWriter(self.output_filepath, self.output_filename, excel, self.info.emit)
doc.write()
except Exception as e:
self.error.emit("😢 不好出错了", str(e))