The QPrinterInfo class gives access to information about existing printers. 更多...
| 头: | #include <QPrinterInfo> |
| Since: | Qt 4.4 |
| QPrinterInfo () | |
| QPrinterInfo (const QPrinterInfo & other ) | |
| QPrinterInfo (const QPrinter & printer ) | |
| ~QPrinterInfo () | |
| bool | isDefault () const |
| bool | isNull () const |
| QString | printerName () const |
| QList<QPrinter::PaperSize> | supportedPaperSizes () const |
| QPrinterInfo & | operator= (const QPrinterInfo & other ) |
| QList<QPrinterInfo> | availablePrinters () |
| QPrinterInfo | defaultPrinter () |
The QPrinterInfo class gives access to information about existing printers.
使用静态函数以生成列表为 QPrinterInfo 对象。每个 QPrinterInfo 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.
构造空的 QPrinterInfo 对象。
另请参阅 isNull ().
构造副本为 other .
该函数在 Qt 4.8 引入。
构造 QPrinterInfo 对象从 printer .
销毁 QPrinterInfo 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 using isNull () before being used, in case there is no default printer.
另请参阅 isNull ().
Returns whether this printer is the default printer.
Returns whether this QPrinterInfo object holds a printer definition.
空 QPrinterInfo object could result for example from calling defaultPrinter () when there are no printers on the system.
Returns the name of the printer.
另请参阅 QPrinter::setPrinterName ().
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.
该函数在 Qt 4.4 引入。
设置 QPrinterInfo 对象等于 other .
该函数在 Qt 4.8 引入。