移出BASIC_FONT参数,因为其他模块文件找不到这个全局变量
This commit is contained in:
parent
aa976efcb8
commit
0120558b12
@ -7,6 +7,13 @@ from qtpy import QtWidgets, QtGui, QtCore
|
|||||||
from vnpy.trader.vtGlobal import globalSetting
|
from vnpy.trader.vtGlobal import globalSetting
|
||||||
from vnpy.trader.vtFunction import loadIconPath
|
from vnpy.trader.vtFunction import loadIconPath
|
||||||
|
|
||||||
|
BASIC_FONT = None
|
||||||
|
try:
|
||||||
|
family = globalSetting['fontFamily']
|
||||||
|
size = globalSetting['fontSize']
|
||||||
|
BASIC_FONT = QtGui.QFont(family, size)
|
||||||
|
except:
|
||||||
|
BASIC_FONT = QtGui.QFont(u'微软雅黑', 12)
|
||||||
|
|
||||||
#----------------------------------------------------------------------
|
#----------------------------------------------------------------------
|
||||||
def createQApp():
|
def createQApp():
|
||||||
@ -28,12 +35,6 @@ def createQApp():
|
|||||||
ctypes.windll.shell32.SetCurrentProcessExplicitAppUserModelID('vn.trader')
|
ctypes.windll.shell32.SetCurrentProcessExplicitAppUserModelID('vn.trader')
|
||||||
|
|
||||||
# 设置Qt字体
|
# 设置Qt字体
|
||||||
try:
|
|
||||||
family = globalSetting['fontFamily']
|
|
||||||
size = globalSetting['fontSize']
|
|
||||||
BASIC_FONT = QtGui.QFont(family, size)
|
|
||||||
except:
|
|
||||||
BASIC_FONT = QtGui.QFont(u'微软雅黑', 12)
|
|
||||||
qApp.setFont(BASIC_FONT)
|
qApp.setFont(BASIC_FONT)
|
||||||
|
|
||||||
# 设置Qt图标
|
# 设置Qt图标
|
||||||
|
Loading…
Reference in New Issue
Block a user