(self, mode: Qt.AspectRatioMode)
Set the scale aspect mode.

        The widget will try to keep (hint) the scale ratio via the sizeHint
        reimplementation.
Set the scale aspect mode.
Set the scale aspect mode .
def setAspectRatioMode(self, mode: Qt.AspectRatioMode) -> None:
        """
        Set the scale aspect mode.

        The widget will try to keep (hint) the scale ratio via the sizeHint
        reimplementation.
        """
        if self.__aspectRatioMode != mode:
            self.__aspectRatioMode = mode
            for hm in chain.from_iterable(self.heatmap_widget_grid):
                hm.setAspectMode(mode)
            sp = self.sizePolicy()
            sp.setHeightForWidth(mode != Qt.IgnoreAspectRatio)
            self.setSizePolicy(sp)
def setAspectRatioMode ( self , mode : Qt . AspectRatioMode ) -> None : if self . __aspectRatioMode != mode : self . __aspectRatioMode = mode for hm in chain . from_iterable ( self . heatmap_widget_grid ) : hm . setAspectMode ( mode ) sp = self . sizePolicy ( ) sp . setHeightForWidth ( mode != Qt . IgnoreAspectRatio ) self . setSizePolicy ( sp )