Пример #1
0
    def rowsAboutToBeRemoved(self, parent, start, end):

        if not self.model():
            return
        row = start
        while row <= end:

            index = self.model().index(row, 1, self.rootIndex())
            value = self.model().data(index).toDouble()[0]
            if value > 0.0:
                self.totalValue -= value
                self.validItems -= 1

            row += 1

        QAbstractItemView.rowsAboutToBeRemoved(self, parent, start, end)