(self, which: Qt.SizeHint, constraint=QSizeF())
return sh
Reimplemented.
Reimplemented.
Reimplemented .
def sizeHint(self, which: Qt.SizeHint, constraint=QSizeF()) -> QSizeF:
        """Reimplemented."""
        if which == Qt.PreferredSize:
            sh = self.__naturalsh()
            if self.__orientation == Qt.Vertical:
                if 0 < constraint.height() < sh.height():
                    sh = scaled(sh, constraint, Qt.KeepAspectRatioByExpanding)
            else:
                sh = sh.transposed()
                if 0 < constraint.width() < sh.width():
                    sh = scaled(sh, constraint, Qt.KeepAspectRatioByExpanding)
        else:
            sh = super().sizeHint(which, constraint)
        return sh
def sizeHint ( self , which : Qt . SizeHint , constraint = QSizeF ( ) ) -> QSizeF : if which == Qt . PreferredSize : sh = self . __naturalsh ( ) if self . __orientation == Qt . Vertical : if 0 < constraint . height ( ) < sh . height ( ) : sh = scaled ( sh , constraint , Qt . KeepAspectRatioByExpanding ) else : sh = sh . transposed ( ) if 0 < constraint . width ( ) < sh . width ( ) : sh = scaled ( sh , constraint , Qt . KeepAspectRatioByExpanding ) else : sh = super ( ) . sizeHint ( which , constraint ) return sh