def METHOD_NAME(self) -> (int, int):
    selection = self.selectionModel().selection()
    if selection.isEmpty():
        return 0, self.model().columnCount() - 1
    return min([rng.left() for rng in selection]), max([rng.right() for rng in selection])