Пример #1
0
    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))
Пример #2
0
    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))