[增强] 处理部分APP没有UI界面情况
This commit is contained in:
parent
92b3d652bc
commit
fba165f93d
@ -107,6 +107,7 @@ class MainWindow(QtWidgets.QMainWindow):
|
|||||||
|
|
||||||
all_apps = self.main_engine.get_all_apps()
|
all_apps = self.main_engine.get_all_apps()
|
||||||
for app in all_apps:
|
for app in all_apps:
|
||||||
|
try:
|
||||||
ui_module = import_module(app.app_module + ".ui")
|
ui_module = import_module(app.app_module + ".ui")
|
||||||
widget_class = getattr(ui_module, app.widget_name)
|
widget_class = getattr(ui_module, app.widget_name)
|
||||||
|
|
||||||
@ -118,7 +119,8 @@ class MainWindow(QtWidgets.QMainWindow):
|
|||||||
self.add_toolbar_action(
|
self.add_toolbar_action(
|
||||||
app.display_name, icon_path, func
|
app.display_name, icon_path, func
|
||||||
)
|
)
|
||||||
|
except Exception as ex:
|
||||||
|
print(f'加载{app.app_module}出现异常:{str(ex)}')
|
||||||
# Global setting editor
|
# Global setting editor
|
||||||
action = QtWidgets.QAction("配置", self)
|
action = QtWidgets.QAction("配置", self)
|
||||||
action.triggered.connect(self.edit_global_setting)
|
action.triggered.connect(self.edit_global_setting)
|
||||||
|
Loading…
Reference in New Issue
Block a user