Skip to content

PythonQt.QtCore.QSizeF · declarations 001

Back to PythonQt.QtCore.QSizeF

boundedTo

boundedTo(arg__1: Any) -> Any

X.boundedTo(arg__1) -> PythonQt.QtCore.QSizeF

Supplemental documentation: Qt 5 reference:

QSizeF QSizeF::boundedTo(const QSizeF \&otherSize) const

Returns a size holding the minimum width and height of this size and the given otherSize.

See also expandedTo() and scale().

Upstream PySide2 reference signatures (binding differences may apply):

boundedTo(self, arg__1: PySide2.QtCore.QSizeF) -> PySide2.QtCore.QSizeF

Source: https://doc.qt.io/archives/qt-5.15/qsizef.html#boundedTo

expandedTo

expandedTo(arg__1: Any) -> Any

X.expandedTo(arg__1) -> PythonQt.QtCore.QSizeF

Supplemental documentation: Qt 5 reference:

QSizeF QSizeF::expandedTo(const QSizeF \&otherSize) const

Returns a size holding the maximum width and height of this size and the given otherSize.

See also boundedTo() and scale().

Upstream PySide2 reference signatures (binding differences may apply):

expandedTo(self, arg__1: PySide2.QtCore.QSizeF) -> PySide2.QtCore.QSizeF

Source: https://doc.qt.io/archives/qt-5.15/qsizef.html#expandedTo

height

height() -> float

X.height() -> float

Supplemental documentation: Qt 5 reference:

qreal QSizeF::height() const

Returns the height.

See also width() and setHeight().

Upstream PySide2 reference signatures (binding differences may apply):

height(self) -> float

Source: https://doc.qt.io/archives/qt-5.15/qsizef.html#height

isEmpty

isEmpty() -> bool

X.isEmpty() -> bool

Supplemental documentation: Qt 5 reference:

bool QSizeF::isEmpty() const

Returns true if either of the width and height is less than or equal to 0; otherwise returns false.

See also isNull() and isValid().

Upstream PySide2 reference signatures (binding differences may apply):

isEmpty(self) -> bool

Source: https://doc.qt.io/archives/qt-5.15/qsizef.html#isEmpty

isNull

isNull() -> bool

X.isNull() -> bool

Supplemental documentation: Qt 5 reference:

bool QSizeF::isNull() const

Returns true if both the width and height are 0.0 (ignoring the sign); otherwise returns false.

See also isValid() and isEmpty().

Upstream PySide2 reference signatures (binding differences may apply):

isNull(self) -> bool

Source: https://doc.qt.io/archives/qt-5.15/qsizef.html#isNull

isValid

isValid() -> bool

X.isValid() -> bool

Supplemental documentation: Qt 5 reference:

bool QSizeF::isValid() const

Returns true if both the width and height is equal to or greater than 0; otherwise returns false.

See also isNull() and isEmpty().

Upstream PySide2 reference signatures (binding differences may apply):

isValid(self) -> bool

Source: https://doc.qt.io/archives/qt-5.15/qsizef.html#isValid

scale

scale(w: Any, h: Any, mode: Any) -> None

X.scale(w, h, mode)

Supplemental documentation: Qt 5 reference:

void QSizeF::scale(qreal width, qreal height, Qt::AspectRatioMode mode)

Scales the size to a rectangle with the given width and height, according to the specified mode.

  • If mode is Qt::IgnoreAspectRatio, the size is set to (width, height).
  • If mode is Qt::KeepAspectRatio, the current size is scaled to a rectangle as large as possible inside (width, height), preserving the aspect ratio.
  • If mode is Qt::KeepAspectRatioByExpanding, the current size is scaled to a rectangle as small as possible outside (width, height), preserving the aspect ratio.

Example:

QSizeF t1(10, 12);
t1.scale(60, 60, Qt::IgnoreAspectRatio);
// t1 is (60, 60)

QSizeF t2(10, 12);
t2.scale(60, 60, Qt::KeepAspectRatio);
// t2 is (50, 60)

QSizeF t3(10, 12);
t3.scale(60, 60, Qt::KeepAspectRatioByExpanding);
// t3 is (60, 72)

See also setWidth(), setHeight(), and scaled().

void QSizeF::scale(const QSizeF \&size, Qt::AspectRatioMode mode)

This is an overloaded function.

Scales the size to a rectangle with the given size, according to the specified mode.

Upstream PySide2 reference signatures (binding differences may apply):

scale(self, s: PySide2.QtCore.QSizeF, mode: PySide2.QtCore.Qt.AspectRatioMode) -> None
scale(self, w: float, h: float, mode: PySide2.QtCore.Qt.AspectRatioMode) -> None

Source: https://doc.qt.io/archives/qt-5.15/qsizef.html#scale

scaled

scaled(w: Any, h: Any, mode: Any) -> Any

X.scaled(w, h, mode) -> PythonQt.QtCore.QSizeF

Supplemental documentation: Qt 5 reference:

QSizeF QSizeF::scaled(qreal width, qreal height, Qt::AspectRatioMode mode) const

Returns a size scaled to a rectangle with the given width and height, according to the specified mode.

This function was introduced in Qt 5.0.

See also scale().

QSizeF QSizeF::scaled(const QSizeF \&s, Qt::AspectRatioMode mode) const

This is an overloaded function.

Returns a size scaled to a rectangle with the given size s, according to the specified mode.

This function was introduced in Qt 5.0.

Upstream PySide2 reference signatures (binding differences may apply):

scaled(self, s: PySide2.QtCore.QSizeF, mode: PySide2.QtCore.Qt.AspectRatioMode) -> PySide2.QtCore.QSizeF
scaled(self, w: float, h: float, mode: PySide2.QtCore.Qt.AspectRatioMode) -> PySide2.QtCore.QSizeF

Source: https://doc.qt.io/archives/qt-5.15/qsizef.html#scaled

setHeight

setHeight(h: float) -> None

X.setHeight(h)

Supplemental documentation: Qt 5 reference:

void QSizeF::setHeight(qreal height)

Sets the height to the given height.

See also height(), rheight(), and setWidth().

Upstream PySide2 reference signatures (binding differences may apply):

setHeight(self, h: float) -> None

Source: https://doc.qt.io/archives/qt-5.15/qsizef.html#setHeight

setWidth

setWidth(w: float) -> None

X.setWidth(w)

Supplemental documentation: Qt 5 reference:

void QSizeF::setWidth(qreal width)

Sets the width to the given width.

See also width(), rwidth(), and setHeight().

Upstream PySide2 reference signatures (binding differences may apply):

setWidth(self, w: float) -> None

Source: https://doc.qt.io/archives/qt-5.15/qsizef.html#setWidth

toSize

toSize() -> Any

X.toSize() -> PythonQt.QtCore.QSize

Supplemental documentation: Qt 5 reference:

QSize QSizeF::toSize() const

Returns an integer based copy of this size.

Note that the coordinates in the returned size will be rounded to the nearest integer.

See also QSizeF().

Upstream PySide2 reference signatures (binding differences may apply):

toSize(self) -> PySide2.QtCore.QSize

Source: https://doc.qt.io/archives/qt-5.15/qsizef.html#toSize

transpose

transpose() -> None

X.transpose()

Supplemental documentation: Qt 5 reference:

void QSizeF::transpose()

Swaps the width and height values.

See also setWidth(), setHeight(), and transposed().

Upstream PySide2 reference signatures (binding differences may apply):

transpose(self) -> None

Source: https://doc.qt.io/archives/qt-5.15/qsizef.html#transpose

transposed

transposed() -> Any

X.transposed() -> PythonQt.QtCore.QSizeF

Supplemental documentation: Qt 5 reference:

QSizeF QSizeF::transposed() const

Returns the size with width and height values swapped.

This function was introduced in Qt 5.0.

See also transpose().

Upstream PySide2 reference signatures (binding differences may apply):

transposed(self) -> PySide2.QtCore.QSizeF

Source: https://doc.qt.io/archives/qt-5.15/qsizef.html#transposed

width

width() -> float

X.width() -> float

Supplemental documentation: Qt 5 reference:

qreal QSizeF::width() const

Returns the width.

See also height() and setWidth().

Upstream PySide2 reference signatures (binding differences may apply):

width(self) -> float

Source: https://doc.qt.io/archives/qt-5.15/qsizef.html#width