From 0120558b12f460c4c668b67dfd7bb305aabb93ec Mon Sep 17 00:00:00 2001 From: Wisfern Date: Tue, 25 Jul 2017 22:36:30 +0800 Subject: [PATCH] =?UTF-8?q?=E7=A7=BB=E5=87=BABASIC=5FFONT=E5=8F=82?= =?UTF-8?q?=E6=95=B0=EF=BC=8C=E5=9B=A0=E4=B8=BA=E5=85=B6=E4=BB=96=E6=A8=A1?= =?UTF-8?q?=E5=9D=97=E6=96=87=E4=BB=B6=E6=89=BE=E4=B8=8D=E5=88=B0=E8=BF=99?= =?UTF-8?q?=E4=B8=AA=E5=85=A8=E5=B1=80=E5=8F=98=E9=87=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- vnpy/trader/uiQt.py | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/vnpy/trader/uiQt.py b/vnpy/trader/uiQt.py index 227ffc55..b6af0a13 100644 --- a/vnpy/trader/uiQt.py +++ b/vnpy/trader/uiQt.py @@ -7,6 +7,13 @@ from qtpy import QtWidgets, QtGui, QtCore from vnpy.trader.vtGlobal import globalSetting 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(): @@ -28,12 +35,6 @@ def createQApp(): ctypes.windll.shell32.SetCurrentProcessExplicitAppUserModelID('vn.trader') # 设置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) # 设置Qt图标