(self, width=None)
Set a maximum width so that nothing exceeds it.
        This function will be re-run each time a new widget is added.
Set a maximum width so that nothing exceeds it.
        This function will be re-run each time a new widget is added.
Set a maximum width so that nothing exceeds it . This function will be re - run each time a new widget is added .
def setMaximumItemWidth(self, width=None):
        """Set a maximum width so that nothing exceeds it.
        This function will be re-run each time a new widget is added.
        """
        self._maximumItemWidth = width
        if width is None:
            self._maximumItemAdjustedHeight = None
        else:
            if self._maxAspect:
                max_height = width / self._maxAspect
                self._maximumItemAdjustedHeight = max_height
            else:
                self._maximumItemAdjustedHeight = None
        
        #Recalculate height if changed
        if self._widgetReady and self._maximumItemAdjustedHeight is not None and self._maximumItemAdjustedHeight < self._gridSize:
            self.setGridSize(self._maximumItemAdjustedHeight)
def setMaximumItemWidth ( self , width = None ) : self . _maximumItemWidth = width if width is None : self . _maximumItemAdjustedHeight = None else : if self . _maxAspect : max_height = width / self . _maxAspect self . _maximumItemAdjustedHeight = max_height else : self . _maximumItemAdjustedHeight = None #Recalculate height if changed if self . _widgetReady and self . _maximumItemAdjustedHeight is not None and self . _maximumItemAdjustedHeight < self . _gridSize : self . setGridSize ( self . _maximumItemAdjustedHeight )