Skip to content

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