def METHOD_NAME(self) -> QSize:
    size = QSize()
    for item in self._items:
        size = size.expandedTo(item.METHOD_NAME())
    left, top, right, bottom = self.getContentsMargins()
    size += QSize(left + right, top + bottom)
    return size