Skip to content

PythonQt.Qt.QSize

QSize

PythonQtInstanceWrapper object

Native bases: PythonQtInstanceWrapper

Supplemental documentation: Qt 5 reference:

Detailed Description

A size is specified by a width() and a height(). It can be set in the constructor and changed using the setWidth(), setHeight(), or scale() functions, or using arithmetic operators. A size can also be manipulated directly by retrieving references to the width and height using the rwidth() and rheight() functions. Finally, the width and height can be swapped using the transpose() function.

The isValid() function determines if a size is valid (a valid size has both width and height greater than or equal to zero). The isEmpty() function returns true if either of the width and height is less than, or equal to, zero, while the isNull() function returns true only if both the width and the height is zero.

Use the expandedTo() function to retrieve a size which holds the maximum height and width of this size and a given size. Similarly, the boundedTo() function returns a size which holds the minimum height and width of this size and a given size.

QSize objects can be streamed as well as compared.

Source: https://doc.qt.io/archives/qt-5.15/qsize.html

Complete member index

Every captured member retains its own identity. Identical captured declaration text is linked once; this does not establish native inheritance or interchangeable objects.

Member Kind Signature Summary
__init__ function (self, *args: Any, **kwargs: Any) -> None Native constructor; consult class documentation for supported overloads. (shared captured text)
boundedTo function (self, arg__1: Any) -> Any X.boundedTo(arg__1) -> PythonQt.QtCore.QSize (shared captured text)
className function (self, *args: Any, **kwargs: Any) -> Any Return the classname of the object (shared captured text)
delete function (self, *args: Any, **kwargs: Any) -> Any Deletes the C++ object (at your own risk, my friend!) (shared captured text)
expandedTo function (self, arg__1: Any) -> Any X.expandedTo(arg__1) -> PythonQt.QtCore.QSize (shared captured text)
height function (self) -> int X.height() -> int (shared captured text)
help function (self, *args: Any, **kwargs: Any) -> Any Shows the help of available methods for this class (shared captured text)
inherits function (self, *args: Any, **kwargs: Any) -> Any Returns if the class inherits or is of given type name (shared captured text)
isEmpty function (self) -> bool X.isEmpty() -> bool (shared captured text)
isNull function (self) -> bool X.isNull() -> bool (shared captured text)
isValid function (self) -> bool X.isValid() -> bool (shared captured text)
readFrom function (self, arg__1: Any) -> Any (shared captured text)
scale function (self, w: Any, h: Any, mode: Any) -> None X.scale(w, h, mode) (shared captured text)
scaled function (self, w: Any, h: Any, mode: Any) -> Any X.scaled(w, h, mode) -> PythonQt.QtCore.QSize (shared captured text)
setHeight function (self, h: int) -> None Sets the height to the given height. (shared captured text)
setWidth function (self, w: int) -> None Sets the width to the given width. (shared captured text)
transpose function (self) -> None Swaps the width and height values. (shared captured text)
transposed function (self) -> Any X.transposed() -> PythonQt.QtCore.QSize (shared captured text)
width function (self) -> int X.width() -> int (shared captured text)
writeTo function (self, arg__1: Any) -> Any (shared captured text)