Can I re-count the verticalHeader when I go to hide a row of QTableView?

Solution for Can I re-count the verticalHeader when I go to hide a row of QTableView?
is Given Below:

I’ll use some filtering criteria to hide some of the rows, I want the verticalHeader to redisplay the sequence number:

from PyQt5 import QtWidgets
from PyQt5 import QtGui


class MyQTableView(QtWidgets.QTableView):
    def __init__(self, parent=None):
        super(MyQTableView, self).__init__(parent)
        self.model = QtGui.QStandardItemModel()
        self.setModel(self.model)

        self.init_data(['title'], [('a',), ('b',), ('c',)])

    def init_data(self, headers, datas):
        self.model.setHorizontalHeaderLabels(headers)
        for row, rows in enumerate(datas):
            for column, data in enumerate(rows):
                item = QtGui.QStandardItem(f'{data}')
                self.model.setItem(row, column, item)
                if row == 1:
                    #To hide a row
                    self.setRowHidden(1, True)


if __name__ == "__main__":
    import sys
    app = QtWidgets.QApplication(sys.argv)
    table = MyQTableView()
    table.show()
    sys.exit(app.exec_())

The actual QTableView is as follows:

     title

1     a

3     c

The expected QTableView as:

     title

1     a

2     c

In this case instead of hiding rows it is better to use a QSortFilterProxyModel where it overrides the headerData so that it does not depend on the sourceModel and implementing the custom filter.

class FilterProxyModel(QtCore.QSortFilterProxyModel):
    def headerData(self, section, orientation, role):
        if orientation == QtCore.Qt.Vertical and role == QtCore.Qt.DisplayRole:
            return section + 1
        return super().headerData(section, orientation, role)

    def filterAcceptsRow(self, row, parent):
        if row == 1:
            return False
        return True


class MyQTableView(QtWidgets.QTableView):
    def __init__(self, parent=None):
        super(MyQTableView, self).__init__(parent)
        self.model = QtGui.QStandardItemModel()
        self.proxy_model = FilterProxyModel()
        self.proxy_model.setSourceModel(self.model)
        self.setModel(self.proxy_model)

        self.init_data(["title"], [("a",), ("b",), ("c",)])

    def init_data(self, headers, datas):
        self.model.setHorizontalHeaderLabels(headers)
        for row, rows in enumerate(datas):
            for column, data in enumerate(rows):
                item = QtGui.QStandardItem(f"{data}")
                self.model.setItem(row, column, item)

enter image description here