1026b更新

main
“zcw” 2 years ago
parent 2866456583
commit 2aff31b61e

@ -58,7 +58,7 @@ class VarTableModel(QAbstractTableModel):
def initTable(self):
self.datas = []
self.editableList = []
self.table.parent.initIcon()
proType = Globals.getValue('currentProType')
@ -450,11 +450,15 @@ class ModbusTypeBox(QItemDelegate):
super(ModbusTypeBox, self).__init__(parent)
def paint(self, painter, option, index):
if index.column() == 5:
if index.column() == 5 and index.row() not in self.parent().model.editableList:
data = self.parent().model.datas[index.row()]
comBox = str('cb' + str(index.row()) + str(index.column()))
# try:
# comboBox = getattr(self, comBox)
# except:
setattr(self, comBox, QComboBox())
comboBox = getattr(self, comBox)
# comboBox = getattr(self, comBox)
item = ['Coil Status', 'Input Status', 'Input Register', 'Holding Register']
comboBox.addItems(item)

Loading…
Cancel
Save