[增强] 处理部分APP没有UI界面情况

This commit is contained in:
msincenselee 2020-01-19 16:47:34 +08:00
parent 92b3d652bc
commit fba165f93d

View File

@ -107,6 +107,7 @@ class MainWindow(QtWidgets.QMainWindow):
all_apps = self.main_engine.get_all_apps()
for app in all_apps:
try:
ui_module = import_module(app.app_module + ".ui")
widget_class = getattr(ui_module, app.widget_name)
@ -118,7 +119,8 @@ class MainWindow(QtWidgets.QMainWindow):
self.add_toolbar_action(
app.display_name, icon_path, func
)
except Exception as ex:
print(f'加载{app.app_module}出现异常:{str(ex)}')
# Global setting editor
action = QtWidgets.QAction("配置", self)
action.triggered.connect(self.edit_global_setting)