[Fix]修复runCtaTrading潜在编码错误的问题

This commit is contained in:
vn.py 2018-01-09 17:55:07 +08:00
parent 5afb45e306
commit 71c9db3e47
2 changed files with 8 additions and 0 deletions

View File

@ -1,5 +1,9 @@
# encoding: UTF-8
import sys
reload(sys)
sys.setdefaultencoding('utf8')
import multiprocessing
from time import sleep
from datetime import datetime, time

View File

@ -112,6 +112,10 @@ class MainWindow(QtWidgets.QMainWindow):
appMenu = menubar.addMenu(vtText.APPLICATION)
for appDetail in self.appDetailList:
# 如果没有应用界面,则不添加菜单按钮
if not appDetail['appWidget']:
continue
function = self.createOpenAppFunction(appDetail)
action = self.createAction(appDetail['appDisplayName'], function, loadIconPath(appDetail['appIco']))
appMenu.addAction(action)