Skip to content

PythonQt.QtGui.QPageSize · declarations 004

Back to PythonQt.QtGui.QPageSize

Prc16K instance-attribute

Prc16K: Any

Prc32K instance-attribute

Prc32K: Any

Prc32KBig instance-attribute

Prc32KBig: Any

Quarto instance-attribute

Quarto: Any

SizeMatchPolicy instance-attribute

SizeMatchPolicy: type

int([x]) -> integer int(x, base=10) -> integer

Convert a number or string to an integer, or return 0 if no arguments are given. If x is a number, return x.int(). For floating point numbers, this truncates towards zero.

If x is not a number or if base is given, then x must be a string, bytes, or bytearray instance representing an integer literal in the given base. The literal can be preceded by '+' or '-' and be surrounded by whitespace. The base defaults to 10. Valid bases are 0 and 2-36. Base 0 means to interpret the base from the string as an integer literal.

int('0b100', base=0) 4

Statement instance-attribute

Statement: Any

SuperA instance-attribute

SuperA: Any

SuperB instance-attribute

SuperB: Any

Tabloid instance-attribute

Tabloid: Any

TabloidExtra instance-attribute

TabloidExtra: Any

definitionSize

definitionSize() -> Any

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

Supplemental documentation: Qt 5 reference:

QSizeF QPageSize::definitionSize() const

Returns the definition size of the page size.

For a standard page size this will be the size as defined in the relevant standard, i.e. ISO A4 will be defined in millimeters while ANSI Letter will be defined in inches.

For a custom page size this will be the original size used to create the page size object.

If the QPageSize is invalid then the QSizeF will be invalid.

See also definitionUnits().

[static] QSizeF QPageSize::definitionSize(QPageSize::PageSizeId pageSizeId)

Returns the definition size of the standard pageSizeId.

To obtain the definition units, call QPageSize::definitionUnits().

Upstream PySide2 reference signatures (binding differences may apply):

definitionSize(pageSizeId: PySide2.QtGui.QPageSize.PageSizeId) -> PySide2.QtCore.QSizeF
definitionSize(self) -> PySide2.QtCore.QSizeF

Source: https://doc.qt.io/archives/qt-5.15/qpagesize.html#definitionSize

definitionUnits

definitionUnits() -> Any

X.definitionUnits()

Supplemental documentation: Qt 5 reference:

QPageSize::Unit QPageSize::definitionUnits() const

Returns the definition units of the page size.

For a standard page size this will be the units as defined in the relevant standard, i.e. ISO A4 will be defined in millimeters while ANSI Letter will be defined in inches.

For a custom page size this will be the original units used to create the page size object.

If the QPageSize is invalid then the QPageSize::Unit will be invalid.

See also definitionSize().

[static] QPageSize::Unit QPageSize::definitionUnits(QPageSize::PageSizeId pageSizeId)

Returns the definition units of the standard pageSizeId.

To obtain the definition size, call QPageSize::definitionSize().

Upstream PySide2 reference signatures (binding differences may apply):

definitionUnits(pageSizeId: PySide2.QtGui.QPageSize.PageSizeId) -> PySide2.QtGui.QPageSize.Unit
definitionUnits(self) -> PySide2.QtGui.QPageSize.Unit

Source: https://doc.qt.io/archives/qt-5.15/qpagesize.html#definitionUnits

id

id(units: Any, matchPolicy: Any) -> Any

X.id(units, matchPolicy)

Supplemental documentation: Qt 5 reference:

QPageSize::PageSizeId QPageSize::id() const

Returns the standard QPageSize::PageSizeId of the page, or QPageSize::Custom.

If the QPageSize is invalid then the ID will be QPageSize::Custom.

[static] QPageSize::PageSizeId QPageSize::id(const QSize \&pointSize, QPageSize::SizeMatchPolicy matchPolicy \= FuzzyMatch)

Returns the standard QPageSize::PageSizeId of the given pointSize in points using the given matchPolicy.

If using FuzzyMatch then the point size of the PageSizeId returned may not exactly match the pointSize you passed in. You should call QPageSize::sizePoints() using the returned PageSizeId to find out the actual point size of the PageSizeId before using it in any calculations.

[static] QPageSize::PageSizeId QPageSize::id(const QSizeF \&size, QPageSize::Unit units, QPageSize::SizeMatchPolicy matchPolicy \= FuzzyMatch)

Returns the standard QPageSize::PageSizeId of the given size in units using the given matchPolicy.

If using FuzzyMatch then the unit size of the PageSizeId returned may not exactly match the size you passed in. You should call QPageSize::size() using the returned PageSizeId to find out the actual unit size of the PageSizeId before using it in any calculations.

[static] QPageSize::PageSizeId QPageSize::id(int windowsId)

Returns the PageSizeId for the given Windows DMPAPER enum value windowsId.

If there is no matching PageSizeId then QPageSize::Custom is returned.

Upstream PySide2 reference signatures (binding differences may apply):

id(pointSize: PySide2.QtCore.QSize, matchPolicy: PySide2.QtGui.QPageSize.SizeMatchPolicy=...) -> PySide2.QtGui.QPageSize.PageSizeId
id(self) -> PySide2.QtGui.QPageSize.PageSizeId
id(size: PySide2.QtCore.QSizeF, units: PySide2.QtGui.QPageSize.Unit, matchPolicy: PySide2.QtGui.QPageSize.SizeMatchPolicy=...) -> PySide2.QtGui.QPageSize.PageSizeId
id(windowsId: int) -> PySide2.QtGui.QPageSize.PageSizeId

Source: https://doc.qt.io/archives/qt-5.15/qpagesize.html#id

isEquivalentTo

isEquivalentTo(other: Any) -> bool

X.isEquivalentTo(other) -> bool

Supplemental documentation: Qt 5 reference:

bool QPageSize::isEquivalentTo(const QPageSize \&other) const

Returns true if this page is equivalent to the other page, i.e. if the page has the same size regardless of other attributes like name.

Upstream PySide2 reference signatures (binding differences may apply):

isEquivalentTo(self, other: PySide2.QtGui.QPageSize) -> bool

Source: https://doc.qt.io/archives/qt-5.15/qpagesize.html#isEquivalentTo

isValid

isValid() -> bool

X.isValid() -> bool

Supplemental documentation: Qt 5 reference:

bool QPageSize::isValid() const

Returns true if this page size is valid.

The page size may be invalid if created with an invalid PageSizeId, or a negative or invalid QSize or QSizeF, or the null constructor.

Upstream PySide2 reference signatures (binding differences may apply):

isValid(self) -> bool

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

key

key() -> str

X.key() -> str

Supplemental documentation: Qt 5 reference:

QString QPageSize::key() const

Returns the unique key of the page size.

By default this is the PPD standard mediaOption keyword for the page size, or the PPD custom format key. If the QPageSize instance was obtained from a print device then this will be the key provided by the print device and may differ from the standard key.

If the QPageSize is invalid then the key will be an empty string.

This key should never be shown to end users, it is an internal key only. For a human-readable name use name().

See also name().

[static] QString QPageSize::key(QPageSize::PageSizeId pageSizeId)

Returns the PPD mediaOption keyword of the standard pageSizeId.

If the QPageSize is invalid then the key will be empty.

Upstream PySide2 reference signatures (binding differences may apply):

key(pageSizeId: PySide2.QtGui.QPageSize.PageSizeId) -> str
key(self) -> str

Source: https://doc.qt.io/archives/qt-5.15/qpagesize.html#key

name

name() -> str

X.name() -> str

Supplemental documentation: Qt 5 reference:

QString QPageSize::name() const

Returns a localized human-readable name for the page size.

If the QPageSize instance was obtained from a print device then the name used is that provided by the print device. Note that a print device may not support the current default locale language.

If the QPageSize is invalid then the name will be an empty string.

[static] QString QPageSize::name(QPageSize::PageSizeId pageSizeId)

Returns the localized name of the standard pageSizeId.

If the QPageSize is invalid then the name will be empty.

Upstream PySide2 reference signatures (binding differences may apply):

name(pageSizeId: PySide2.QtGui.QPageSize.PageSizeId) -> str
name(self) -> str

Source: https://doc.qt.io/archives/qt-5.15/qpagesize.html#name

operator_assign

operator_assign(other: Any) -> Any

X.operator_assign(other) -> PythonQt.QtGui.QPageSize

rect

rect(units: Any) -> Any

X.rect(units) -> PythonQt.QtCore.QRectF

Supplemental documentation: Qt 5 reference:

QRectF QPageSize::rect(QPageSize::Unit units) const

Returns the page rectangle in the required units.

If the QPageSize is invalid then the QRect will be invalid.

Upstream PySide2 reference signatures (binding differences may apply):

rect(self, units: PySide2.QtGui.QPageSize.Unit) -> PySide2.QtCore.QRectF

Source: https://doc.qt.io/archives/qt-5.15/qpagesize.html#rect

rectPixels

rectPixels(resolution: int) -> Any

X.rectPixels(resolution) -> PythonQt.QtCore.QRect

Supplemental documentation: Qt 5 reference:

QRect QPageSize::rectPixels(int resolution) const

Returns the page rectangle in Device Pixels at the given resolution.

If the QPageSize is invalid then the QRect will be invalid.

Upstream PySide2 reference signatures (binding differences may apply):

rectPixels(self, resolution: int) -> PySide2.QtCore.QRect

Source: https://doc.qt.io/archives/qt-5.15/qpagesize.html#rectPixels

rectPoints

rectPoints() -> Any

X.rectPoints() -> PythonQt.QtCore.QRect

Supplemental documentation: Qt 5 reference:

QRect QPageSize::rectPoints() const

Returns the page rectangle in Postscript Points (1/72 of an inch).

If the QPageSize is invalid then the QRect will be invalid.

Upstream PySide2 reference signatures (binding differences may apply):

rectPoints(self) -> PySide2.QtCore.QRect

Source: https://doc.qt.io/archives/qt-5.15/qpagesize.html#rectPoints

size

size(pageSizeId: Any, units: Any) -> Any

X.size(pageSizeId, units) -> PythonQt.QtCore.QSizeF

Supplemental documentation: Qt 5 reference:

QSizeF QPageSize::size(QPageSize::Unit units) const

Returns the size of the page in the required units.

If the QPageSize is invalid then the QSizeF will be invalid.

[static] QSizeF QPageSize::size(QPageSize::PageSizeId pageSizeId, QPageSize::Unit units)

Returns the size of the standard pageSizeId in the requested units.

Upstream PySide2 reference signatures (binding differences may apply):

size(pageSizeId: PySide2.QtGui.QPageSize.PageSizeId, units: PySide2.QtGui.QPageSize.Unit) -> PySide2.QtCore.QSizeF
size(self, units: PySide2.QtGui.QPageSize.Unit) -> PySide2.QtCore.QSizeF

Source: https://doc.qt.io/archives/qt-5.15/qpagesize.html#size

sizePixels

sizePixels(pageSizeId: Any, resolution: int) -> Any

X.sizePixels(pageSizeId, resolution) -> PythonQt.QtCore.QSize

Supplemental documentation: Qt 5 reference:

QSize QPageSize::sizePixels(int resolution) const

Returns the size of the page in Device Pixels at the given resolution.

If the QPageSize is invalid then the QSize will be invalid.

[static] QSize QPageSize::sizePixels(QPageSize::PageSizeId pageSizeId, int resolution)

Returns the size of the standard pageSizeId in Device Pixels for the given resolution.

Upstream PySide2 reference signatures (binding differences may apply):

sizePixels(pageSizeId: PySide2.QtGui.QPageSize.PageSizeId, resolution: int) -> PySide2.QtCore.QSize
sizePixels(self, resolution: int) -> PySide2.QtCore.QSize

Source: https://doc.qt.io/archives/qt-5.15/qpagesize.html#sizePixels

sizePoints

sizePoints() -> Any

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

Supplemental documentation: Qt 5 reference:

QSize QPageSize::sizePoints() const

Returns the size of the page in Postscript Points (1/72 of an inch).

If the QPageSize is invalid then the QSize will be invalid.

[static] QSize QPageSize::sizePoints(QPageSize::PageSizeId pageSizeId)

Returns the size of the standard pageSizeId in Points.

Upstream PySide2 reference signatures (binding differences may apply):

sizePoints(pageSizeId: PySide2.QtGui.QPageSize.PageSizeId) -> PySide2.QtCore.QSize
sizePoints(self) -> PySide2.QtCore.QSize

Source: https://doc.qt.io/archives/qt-5.15/qpagesize.html#sizePoints

swap

swap(other: Any) -> None

X.swap(other)

Supplemental documentation: Qt 5 reference:

void QPageSize::swap(QPageSize \&other)

Swaps this QPageSize with other. This function is very fast and never fails.

Upstream PySide2 reference signatures (binding differences may apply):

swap(self, other: PySide2.QtGui.QPageSize) -> None

Source: https://doc.qt.io/archives/qt-5.15/qpagesize.html#swap

windowsId

windowsId() -> int

X.windowsId() -> int

Supplemental documentation: Qt 5 reference:

int QPageSize::windowsId() const

Returns the Windows DMPAPER enum value for the page size.

Not all valid PPD page sizes have a Windows equivalent, in which case 0 will be returned.

If the QPageSize is invalid then the Windows ID will be 0.

See also id().

[static] int QPageSize::windowsId(QPageSize::PageSizeId pageSizeId)

Returns the Windows DMPAPER enum value of the standard pageSizeId.

Not all valid PPD page sizes have a Windows equivalent, in which case 0 will be returned.

Upstream PySide2 reference signatures (binding differences may apply):

windowsId(pageSizeId: PySide2.QtGui.QPageSize.PageSizeId) -> int
windowsId(self) -> int

Source: https://doc.qt.io/archives/qt-5.15/qpagesize.html#windowsId