def setModelData(self, editor, model, index): col = index.column() if col == 1: newValue = editor.value()*0.01 else: newValue = editor.value() model.setData(index, to_qvariant(newValue))
def setModelData(self, editor, model, index): node = index.internalPointer() if node.type_info == 'BAREME': newValue = None elif node.value_format == 'percent': newValue = editor.value()*0.01 else: newValue = editor.value() model.setData(index, to_qvariant(newValue))