提交IbGateway对中文日志信息的支持

This commit is contained in:
chenxy123 2016-12-05 21:40:55 +08:00
parent 03e4f73139
commit cbdfeada50
2 changed files with 4 additions and 4 deletions

View File

@ -335,7 +335,7 @@ class IbWrapper(IbApi):
err = VtErrorData()
err.gatewayName = self.gatewayName
err.errorID = errorCode
err.errorMsg = errorString
err.errorMsg = errorString.decode('GBK')
self.gateway.onError(err)
#----------------------------------------------------------------------

View File

@ -288,7 +288,7 @@ class BasicMonitor(QtGui.QTableWidget):
if key not in self.dataDict:
self.insertRow(0)
d = {}
for n, header in enumerate(self.headerList):
for n, header in enumerate(self.headerList):
content = safeUnicode(data.__getattribute__(header))
cellType = self.headerDict[header]['cellType']
cell = cellType(content, self.mainEngine)
@ -323,10 +323,10 @@ class BasicMonitor(QtGui.QTableWidget):
if self.font:
cell.setFont(self.font)
if self.saveData:
if self.saveData:
cell.data = data
self.setItem(0, n, cell)
self.setItem(0, n, cell)
# 调整列宽
self.resizeColumns()