Sets whether or not this widget should automatically resize its
        height based on its contents.
        
        :param      state | <bool>

def setAutoResizeToContents(self, state):
        """
        Sets whether or not this widget should automatically resize its
        height based on its contents.
        
        :param      state | <bool>
        """
        self._autoResizeToContents = state
        
        if state:
            self.resizeToContents()
            self.setVerticalScrollBarPolicy(QtCore.Qt.ScrollBarAlwaysOff)
            self.setHorizontalScrollBarPolicy(QtCore.Qt.ScrollBarAlwaysOff)
        else:
            self.setVerticalScrollBarPolicy(QtCore.Qt.ScrollBarAsNeeded)
            self.setHorizontalScrollBarPolicy(QtCore.Qt.ScrollBarAsNeeded)