def METHOD_NAME(self):
    # Give the splitter a maximum height to reach. This is assuming that
    # all rows below their headers have the same height
    self.tableView.setMaximumHeight(
        self.tableView.rowHeight(1) * self.tableModel.model.row_count()
        + self.tableView.verticalHeader().sectionSize(0)
        # looks like the handle is taken into account by the splitter
        + self.splitter.handle(1).size().height()
    )
    DetailsDialogBase.METHOD_NAME(self)
    self.ensure_same_sizes()
    self._update()