diff --git a/vnpy/trader/app/spreadTrading/uiStWidget.py b/vnpy/trader/app/spreadTrading/uiStWidget.py index a6881378..7f505c8b 100644 --- a/vnpy/trader/app/spreadTrading/uiStWidget.py +++ b/vnpy/trader/app/spreadTrading/uiStWidget.py @@ -440,8 +440,12 @@ class StAlgoManager(QtWidgets.QTableWidget): u'状态'] self.setColumnCount(len(headers)) self.setHorizontalHeaderLabels(headers) - self.horizontalHeader().setResizeMode(QtWidgets.QHeaderView.Stretch) + try: + self.horizontalHeader().setResizeMode(QtWidgets.QHeaderView.Stretch) + except AttributeError: + self.horizontalHeader().setSectionResizeMode(QtWidgets.QHeaderView.Stretch) + self.verticalHeader().setVisible(False) self.setEditTriggers(self.NoEditTriggers) diff --git a/vnpy/trader/gateway/xspeedGateway/xspeedGateway.py b/vnpy/trader/gateway/xspeedGateway/xspeedGateway.py index dd46ffef..0d5c883c 100644 --- a/vnpy/trader/gateway/xspeedGateway/xspeedGateway.py +++ b/vnpy/trader/gateway/xspeedGateway/xspeedGateway.py @@ -8,6 +8,7 @@ import os import json import time from copy import copy +from time import sleep from vnpy.api.xspeed import MdApi, TdApi, defineDict from vnpy.trader.vtGateway import *