PythonQt.QtCore.QSize · declarations 001
boundedTo
boundedTo(arg__1: Any) -> Any
X.boundedTo(arg__1) -> PythonQt.QtCore.QSize
Supplemental documentation: Qt 5 reference:
QSize QSize::boundedTo(const QSize \&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.QSize) -> PySide2.QtCore.QSize
Source: https://doc.qt.io/archives/qt-5.15/qsize.html#boundedTo
expandedTo
expandedTo(arg__1: Any) -> Any
X.expandedTo(arg__1) -> PythonQt.QtCore.QSize
Supplemental documentation: Qt 5 reference:
QSize QSize::expandedTo(const QSize \&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.QSize) -> PySide2.QtCore.QSize
Source: https://doc.qt.io/archives/qt-5.15/qsize.html#expandedTo
height
height() -> int
isEmpty
isEmpty() -> bool
X.isEmpty() -> bool
Supplemental documentation: Qt 5 reference:
bool QSize::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/qsize.html#isEmpty
isNull
isNull() -> bool
X.isNull() -> bool
Supplemental documentation: Qt 5 reference:
bool QSize::isNull() const
Returns true if both the width and height is 0; 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/qsize.html#isNull
isValid
isValid() -> bool
X.isValid() -> bool
Supplemental documentation: Qt 5 reference:
bool QSize::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/qsize.html#isValid
scale
scale(w: Any, h: Any, mode: Any) -> None
X.scale(w, h, mode)
Supplemental documentation: Qt 5 reference:
void QSize::scale(int width, int 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:
QSize t1(10, 12);
t1.scale(60, 60, Qt::IgnoreAspectRatio);
// t1 is (60, 60)
QSize t2(10, 12);
t2.scale(60, 60, Qt::KeepAspectRatio);
// t2 is (50, 60)
QSize t3(10, 12);
t3.scale(60, 60, Qt::KeepAspectRatioByExpanding);
// t3 is (60, 72)
See also setWidth(), setHeight(), and scaled().
void QSize::scale(const QSize \&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.QSize, mode: PySide2.QtCore.Qt.AspectRatioMode) -> None
scale(self, w: int, h: int, mode: PySide2.QtCore.Qt.AspectRatioMode) -> None
Source: https://doc.qt.io/archives/qt-5.15/qsize.html#scale
scaled
scaled(w: Any, h: Any, mode: Any) -> Any
X.scaled(w, h, mode) -> PythonQt.QtCore.QSize
Supplemental documentation: Qt 5 reference:
QSize QSize::scaled(int width, int height, Qt::AspectRatioMode mode) const
Return 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().
QSize QSize::scaled(const QSize \&s, Qt::AspectRatioMode mode) const
This is an overloaded function.
Return 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.QSize, mode: PySide2.QtCore.Qt.AspectRatioMode) -> PySide2.QtCore.QSize
scaled(self, w: int, h: int, mode: PySide2.QtCore.Qt.AspectRatioMode) -> PySide2.QtCore.QSize
Source: https://doc.qt.io/archives/qt-5.15/qsize.html#scaled
setHeight
setHeight(h: int) -> None
X.setHeight(h)
Supplemental documentation: Qt 5 reference:
void QSize::setHeight(int height)
Sets the height to the given height.
See also rheight(), height(), and setWidth().
Upstream PySide2 reference signatures (binding differences may apply):
setHeight(self, h: int) -> None
Source: https://doc.qt.io/archives/qt-5.15/qsize.html#setHeight
setWidth
setWidth(w: int) -> None
X.setWidth(w)
Supplemental documentation: Qt 5 reference:
void QSize::setWidth(int width)
Sets the width to the given width.
See also rwidth(), width(), and setHeight().
Upstream PySide2 reference signatures (binding differences may apply):
setWidth(self, w: int) -> None
Source: https://doc.qt.io/archives/qt-5.15/qsize.html#setWidth
transpose
transpose() -> None
X.transpose()
Supplemental documentation: Qt 5 reference:
void QSize::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/qsize.html#transpose
transposed
transposed() -> Any
X.transposed() -> PythonQt.QtCore.QSize
Supplemental documentation: Qt 5 reference:
QSize QSize::transposed() const
Returns a QSize with width and height swapped.
This function was introduced in Qt 5.0.
See also transpose().
Upstream PySide2 reference signatures (binding differences may apply):
transposed(self) -> PySide2.QtCore.QSize
Source: https://doc.qt.io/archives/qt-5.15/qsize.html#transposed
width
width() -> int