Gets the region of all of the components in selection

        :param selection: a selection model for this view
        :type selection: :qtdoc:`QItemSelectionModel`
        :returns: :qtdoc:`QRegion` -- union of rects of the selected components

def visualRegionForSelection(self, selection):
        """Gets the region of all of the components in selection

        :param selection: a selection model for this view
        :type selection: :qtdoc:`QItemSelectionModel`
        :returns: :qtdoc:`QRegion` -- union of rects of the selected components
        """
        region = QtGui.QRegion()
        for index in selection.indexes():
            region = region.united(self._rects[index.row()][index.column()])

        return region