Skip to content

PythonQt.Qt.QPageSize

QPageSize

PythonQtInstanceWrapper object

Native bases: PythonQtInstanceWrapper

Supplemental documentation: Qt 5 reference:

Detailed Description

This class implements support for the set of standard page sizes as defined in the Adobe Postscript PPD Standard v4.3. It defines the standard set of page sizes in points, millimeters and inches and ensures these sizes are consistently used. Other size units can be used but will be calculated results and so may not always be consistent. The defined point sizes are always a integer, all other sizes can be fractions of a unit.

The defined size is always in width x height order with no implied page orientation. Note that it is possible for page sizes to be defined where the width is greater than the height, such as QPageSize::Ledger, so you cannot rely on comparing the width and height values to determine page orientation.

For example, A4 is defined by the standard as 210mm x 297mm, 8.27in x 11.69in, or 595pt x 842pt.

You can also define custom page sizes with custom names in any units you want and this unit size will be preserved and used as the base for all other unit size calculations.

When creating a QPageSize using a custom QSize you can choose if you want QPageSize to try match the size to a standard page size. By default QPaperSize uses a FuzzyMatch mode where it will match a given page size to a standard page size if it falls within 3 postscript points of a defined standard size. You can override this to request only an exact match but this is not recommended as conversions between units can easily lose 3 points and result in incorrect page sizes.

A QPageSize instance may also be obtained by querying the supported page sizes for a print device. In this case the localized name returned is that defined by the printer itself. Note that the print device may not support the current default locale language.

The class also provides convenience methods for converting page size IDs to and from various unit sizes.

Source: https://doc.qt.io/archives/qt-5.15/qpagesize.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
A0 attribute Any (shared captured text)
A1 attribute Any (shared captured text)
A10 attribute Any (shared captured text)
A2 attribute Any (shared captured text)
A3 attribute Any (shared captured text)
A3Extra attribute Any (shared captured text)
A4 attribute Any (shared captured text)
A4Extra attribute Any (shared captured text)
A4Plus attribute Any (shared captured text)
A4Small attribute Any (shared captured text)
A5 attribute Any (shared captured text)
A5Extra attribute Any (shared captured text)
A6 attribute Any (shared captured text)
A7 attribute Any (shared captured text)
A8 attribute Any (shared captured text)
A9 attribute Any (shared captured text)
AnsiA attribute Any (shared captured text)
AnsiB attribute Any (shared captured text)
AnsiC attribute Any (shared captured text)
AnsiD attribute Any (shared captured text)
AnsiE attribute Any (shared captured text)
ArchA attribute Any (shared captured text)
ArchB attribute Any (shared captured text)
ArchC attribute Any (shared captured text)
ArchD attribute Any (shared captured text)
ArchE attribute Any (shared captured text)
B0 attribute Any (shared captured text)
B1 attribute Any (shared captured text)
B10 attribute Any (shared captured text)
B2 attribute Any (shared captured text)
B3 attribute Any (shared captured text)
B4 attribute Any (shared captured text)
B5 attribute Any (shared captured text)
B5Extra attribute Any (shared captured text)
B6 attribute Any (shared captured text)
B7 attribute Any (shared captured text)
B8 attribute Any (shared captured text)
B9 attribute Any (shared captured text)
C5E attribute Any (shared captured text)
Cicero attribute Any (shared captured text)
Comm10E attribute Any (shared captured text)
Custom attribute Any (shared captured text)
DLE attribute Any (shared captured text)
Didot attribute Any (shared captured text)
DoublePostcard attribute Any (shared captured text)
Envelope10 attribute Any (shared captured text)
Envelope11 attribute Any (shared captured text)
Envelope12 attribute Any (shared captured text)
Envelope14 attribute Any (shared captured text)
Envelope9 attribute Any (shared captured text)
EnvelopeB4 attribute Any (shared captured text)
EnvelopeB5 attribute Any (shared captured text)
EnvelopeB6 attribute Any (shared captured text)
EnvelopeC0 attribute Any (shared captured text)
EnvelopeC1 attribute Any (shared captured text)
EnvelopeC2 attribute Any (shared captured text)
EnvelopeC3 attribute Any (shared captured text)
EnvelopeC4 attribute Any (shared captured text)
EnvelopeC5 attribute Any (shared captured text)
EnvelopeC6 attribute Any (shared captured text)
EnvelopeC65 attribute Any (shared captured text)
EnvelopeC7 attribute Any (shared captured text)
EnvelopeChou3 attribute Any (shared captured text)
EnvelopeChou4 attribute Any (shared captured text)
EnvelopeDL attribute Any (shared captured text)
EnvelopeInvite attribute Any (shared captured text)
EnvelopeItalian attribute Any (shared captured text)
EnvelopeKaku2 attribute Any (shared captured text)
EnvelopeKaku3 attribute Any (shared captured text)
EnvelopeMonarch attribute Any (shared captured text)
EnvelopePersonal attribute Any (shared captured text)
EnvelopePrc1 attribute Any (shared captured text)
EnvelopePrc10 attribute Any (shared captured text)
EnvelopePrc2 attribute Any (shared captured text)
EnvelopePrc3 attribute Any (shared captured text)
EnvelopePrc4 attribute Any (shared captured text)
EnvelopePrc5 attribute Any (shared captured text)
EnvelopePrc6 attribute Any (shared captured text)
EnvelopePrc7 attribute Any (shared captured text)
EnvelopePrc8 attribute Any (shared captured text)
EnvelopePrc9 attribute Any (shared captured text)
EnvelopeYou4 attribute Any (shared captured text)
ExactMatch attribute Any (shared captured text)
Executive attribute Any (shared captured text)
ExecutiveStandard attribute Any (shared captured text)
FanFoldGerman attribute Any (shared captured text)
FanFoldGermanLegal attribute Any (shared captured text)
FanFoldUS attribute Any (shared captured text)
Folio attribute Any (shared captured text)
FuzzyMatch attribute Any (shared captured text)
FuzzyOrientationMatch attribute Any (shared captured text)
Imperial10x11 attribute Any (shared captured text)
Imperial10x13 attribute Any (shared captured text)
Imperial10x14 attribute Any (shared captured text)
Imperial12x11 attribute Any (shared captured text)
Imperial15x11 attribute Any (shared captured text)
Imperial7x9 attribute Any (shared captured text)
Imperial8x10 attribute Any (shared captured text)
Imperial9x11 attribute Any (shared captured text)
Imperial9x12 attribute Any (shared captured text)
Inch attribute Any (shared captured text)
JisB0 attribute Any (shared captured text)
JisB1 attribute Any (shared captured text)
JisB10 attribute Any (shared captured text)
JisB2 attribute Any (shared captured text)
JisB3 attribute Any (shared captured text)
JisB4 attribute Any (shared captured text)
JisB5 attribute Any (shared captured text)
JisB6 attribute Any (shared captured text)
JisB7 attribute Any (shared captured text)
JisB8 attribute Any (shared captured text)
JisB9 attribute Any (shared captured text)
LastPageSize attribute Any (shared captured text)
Ledger attribute Any (shared captured text)
Legal attribute Any (shared captured text)
LegalExtra attribute Any (shared captured text)
Letter attribute Any (shared captured text)
LetterExtra attribute Any (shared captured text)
LetterPlus attribute Any (shared captured text)
LetterSmall attribute Any (shared captured text)
Millimeter attribute Any (shared captured text)
NPageSize attribute Any (shared captured text)
NPaperSize attribute Any (shared captured text)
Note attribute Any (shared captured text)
PageSizeId attribute type Convert a number or string to an integer, or return 0 if no arguments are given. (shared captured text)
Pica attribute Any (shared captured text)
Point attribute Any (shared captured text)
Postcard attribute Any (shared captured text)
Prc16K attribute Any (shared captured text)
Prc32K attribute Any (shared captured text)
Prc32KBig attribute Any (shared captured text)
Quarto attribute Any (shared captured text)
SizeMatchPolicy attribute type Convert a number or string to an integer, or return 0 if no arguments are given. (shared captured text)
Statement attribute Any (shared captured text)
SuperA attribute Any (shared captured text)
SuperB attribute Any (shared captured text)
Tabloid attribute Any (shared captured text)
TabloidExtra attribute Any (shared captured text)
Unit attribute type Convert a number or string to an integer, or return 0 if no arguments are given. (shared captured text)
__init__ function (self, *args: Any, **kwargs: Any) -> None Native constructor; consult class documentation for supported overloads. (shared captured text)
className function (self, *args: Any, **kwargs: Any) -> Any Return the classname of the object (shared captured text)
definitionSize function (self) -> Any X.definitionSize() -> PythonQt.QtCore.QSizeF (shared captured text)
definitionUnits function (self) -> Any Returns the definition units of the page size. (shared captured text)
delete function (self, *args: Any, **kwargs: Any) -> Any Deletes the C++ object (at your own risk, my friend!) (shared captured text)
help function (self, *args: Any, **kwargs: Any) -> Any Shows the help of available methods for this class (shared captured text)
id function (self, units: Any, matchPolicy: Any) -> Any X.id(units, matchPolicy) (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)
isEquivalentTo function (self, other: Any) -> bool X.isEquivalentTo(other) -> bool (shared captured text)
isValid function (self) -> bool X.isValid() -> bool (shared captured text)
key function (self) -> str X.key() -> str (shared captured text)
name function (self) -> str X.name() -> str (shared captured text)
operator_assign function (self, other: Any) -> Any X.operator_assign(other) -> PythonQt.QtGui.QPageSize (shared captured text)
rect function (self, units: Any) -> Any X.rect(units) -> PythonQt.QtCore.QRectF (shared captured text)
rectPixels function (self, resolution: int) -> Any X.rectPixels(resolution) -> PythonQt.QtCore.QRect (shared captured text)
rectPoints function (self) -> Any X.rectPoints() -> PythonQt.QtCore.QRect (shared captured text)
size function (self, pageSizeId: Any, units: Any) -> Any X.size(pageSizeId, units) -> PythonQt.QtCore.QSizeF (shared captured text)
sizePixels function (self, pageSizeId: Any, resolution: int) -> Any X.sizePixels(pageSizeId, resolution) -> PythonQt.QtCore.QSize (shared captured text)
sizePoints function (self) -> Any X.sizePoints() -> PythonQt.QtCore.QSize (shared captured text)
swap function (self, other: Any) -> None Swaps this [QPageSize](https://doc.qt.io/archives/qt-5.15/qpagesize.html) with other. (shared captured text)
windowsId function (self) -> int X.windowsId() -> int (shared captured text)