Merge pull request #1308 from nanoric/fix_app_ui_blank_after_maximiize
[Fix] 修正一个UI错误:修复了最大化app之后关闭再打开会显示一大片空白的问题
This commit is contained in:
commit
ae5151cb76
@ -206,13 +206,15 @@ class MainWindow(QtWidgets.QMainWindow):
|
||||
:return 返回app的窗口
|
||||
"""
|
||||
appName = appDetail['appName']
|
||||
try:
|
||||
self.widgetDict[appName].show()
|
||||
except KeyError:
|
||||
appEngine = self.mainEngine.getApp(appName)
|
||||
self.widgetDict[appName] = appDetail['appWidget'](appEngine, self.eventEngine)
|
||||
self.widgetDict[appName].show()
|
||||
return self.widgetDict[appName]
|
||||
if appName not in self.widgetDict:
|
||||
self.widgetDict[appName] = appDetail['appWidget'](self.mainEngine.getApp(appName),
|
||||
self.eventEngine)
|
||||
app = self.widgetDict[appName] # type: QtWidgets.QWidget
|
||||
app.show()
|
||||
app.resize(app.size()) # 修正最大化后的空白
|
||||
app.raise_() # 移到前台
|
||||
app.activateWindow() # 移到前台并获取焦点
|
||||
return app
|
||||
|
||||
#----------------------------------------------------------------------
|
||||
def createOpenAppFunction(self, appDetail):
|
||||
|
Loading…
Reference in New Issue
Block a user