Movatterモバイル変換


[0]ホーム

URL:


We bake cookies in your browser for a better experience. Using this site means that you consent.Read More

Menu

Qt Documentation

QPrinterInfo Class

TheQPrinterInfo class gives access to information about existing printers.More...

Header:#include <QPrinterInfo>
Since: Qt 4.4

Public Functions

QPrinterInfo()
QPrinterInfo(const QPrinterInfo & other)
QPrinterInfo(const QPrinter & printer)
~QPrinterInfo()
boolisDefault() const
boolisNull() const
QStringprinterName() const
QList<QPrinter::PaperSize>supportedPaperSizes() const
QPrinterInfo &operator=(const QPrinterInfo & other)

Static Public Members

QList<QPrinterInfo>availablePrinters()
QPrinterInfodefaultPrinter()

Detailed Description

TheQPrinterInfo class gives access to information about existing printers.

Use the static functions to generate a list ofQPrinterInfo objects. EachQPrinterInfo object in the list represents a single printer and can be queried for name, supported paper sizes, and whether or not it is the default printer.

Member Function Documentation

QPrinterInfo::QPrinterInfo()

Constructs an emptyQPrinterInfo object.

See alsoisNull().

QPrinterInfo::QPrinterInfo(constQPrinterInfo & other)

Constructs a copy ofother.

This function was introduced in Qt 4.8.

QPrinterInfo::QPrinterInfo(constQPrinter & printer)

Constructs aQPrinterInfo object fromprinter.

QPrinterInfo::~QPrinterInfo()

Destroys theQPrinterInfo object. References to the values in the object become invalid.

[static]QList<QPrinterInfo> QPrinterInfo::availablePrinters()

Returns a list of available printers on the system.

[static]QPrinterInfo QPrinterInfo::defaultPrinter()

Returns the default printer on the system.

The return value should be checked usingisNull() before being used, in case there is no default printer.

See alsoisNull().

bool QPrinterInfo::isDefault() const

Returns whether this printer is the default printer.

bool QPrinterInfo::isNull() const

Returns whether thisQPrinterInfo object holds a printer definition.

An emptyQPrinterInfo object could result for example from callingdefaultPrinter() when there are no printers on the system.

QString QPrinterInfo::printerName() const

Returns the name of the printer.

See alsoQPrinter::setPrinterName().

QList<QPrinter::PaperSize> QPrinterInfo::supportedPaperSizes() const

Returns a list of supported paper sizes by the printer.

Not all printer drivers support this query, so the list may be empty. On Mac OS X 10.3, this function always returns an empty list.

This function was introduced in Qt 4.4.

QPrinterInfo & QPrinterInfo::operator=(constQPrinterInfo & other)

Sets theQPrinterInfo object to be equal toother.

This function was introduced in Qt 4.8.

© 2016 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of theGNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.


[8]ページ先頭

©2009-2025 Movatter.jp