Qt Reference Documentation

Obsolete Members for QPrinter

The following class members are obsolete. They are provided to keep old source code working. We strongly advise against using them in new code.

Public Types

enum PageSize { A0, A1, A2, A3, ..., Custom } (obsolete)

Public Functions

int actualNumCopies () const (obsolete)
int numCopies () const (obsolete)
PageSize pageSize () const (obsolete)
void setNumCopies ( int numCopies ) (obsolete)
void setPageSize ( PageSize newPageSize ) (obsolete)

Member Type Documentation

enum QPrinter::PageSize

Use QPrinter::PaperSize instead.

ConstantValueDescription
QPrinter::A05841 x 1189 mm
QPrinter::A16594 x 841 mm
QPrinter::A27420 x 594 mm
QPrinter::A38297 x 420 mm
QPrinter::A40210 x 297 mm, 8.26 x 11.69 inches
QPrinter::A59148 x 210 mm
QPrinter::A610105 x 148 mm
QPrinter::A71174 x 105 mm
QPrinter::A81252 x 74 mm
QPrinter::A91337 x 52 mm
QPrinter::B0141030 x 1456 mm
QPrinter::B115728 x 1030 mm
QPrinter::B101632 x 45 mm
QPrinter::B217515 x 728 mm
QPrinter::B318364 x 515 mm
QPrinter::B419257 x 364 mm
QPrinter::B51182 x 257 mm, 7.17 x 10.13 inches
QPrinter::B620128 x 182 mm
QPrinter::B72191 x 128 mm
QPrinter::B82264 x 91 mm
QPrinter::B92345 x 64 mm
QPrinter::C5E24163 x 229 mm
QPrinter::Comm10E25105 x 241 mm, U.S. Common 10 Envelope
QPrinter::DLE26110 x 220 mm
QPrinter::Executive47.5 x 10 inches, 191 x 254 mm
QPrinter::Folio27210 x 330 mm
QPrinter::Ledger28432 x 279 mm
QPrinter::Legal38.5 x 14 inches, 216 x 356 mm
QPrinter::Letter28.5 x 11 inches, 216 x 279 mm
QPrinter::Tabloid29279 x 432 mm
QPrinter::Custom30Unknown, or a user defined size.

Member Function Documentation

int QPrinter::actualNumCopies () const

Returns the number of copies that will be printed. The default value is 1.

This function always returns the actual value specified in the print dialog or using setNumCopies().

Use copyCount() instead.

This function was introduced in Qt 4.6.

See also setNumCopies() and numCopies().

int QPrinter::numCopies () const

Returns the number of copies to be printed. The default value is 1.

On Windows, Mac OS X and X11 systems that support CUPS, this will always return 1 as these operating systems can internally handle the number of copies.

On X11, this value will return the number of times the application is required to print in order to match the number specified in the printer setup dialog. This has been done since some printer drivers are not capable of buffering up the copies and in those cases the application must make an explicit call to the print code for each copy.

Use copyCount() in conjunction with supportsMultipleCopies() instead.

See also setNumCopies() and actualNumCopies().

PageSize QPrinter::pageSize () const

Returns the printer page size. The default value is driver-dependent.

Use paperSize() instead.

See also setPageSize().

void QPrinter::setNumCopies ( int numCopies )

Sets the number of copies to be printed to numCopies.

The printer driver reads this setting and prints the specified number of copies.

Use setCopyCount() instead.

See also numCopies().

void QPrinter::setPageSize ( PageSize newPageSize )

Sets the printer page size based on newPageSize.

Use setPaperSize() instead.

See also pageSize().