[Fix]修复两个bug #861

This commit is contained in:
vn.py 2018-05-12 17:44:34 +08:00
parent 28627b1cd4
commit 3d67aa36f0
2 changed files with 6 additions and 1 deletions

View File

@ -440,7 +440,11 @@ 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)

View File

@ -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 *