内容表

上一话题

PySide2.QtPrintSupport

下一话题

QPageSetupDialog

QAbstractPrintDialog

QAbstractPrintDialog 类为用于配置打印机的打印对话框提供基实现。 更多

Inheritance diagram of PySide2.QtPrintSupport.QAbstractPrintDialog

继承者: QPrintDialog

概要

函数

详细描述

This class implements getter and setter functions that are used to customize settings shown in print dialogs, but it is not used directly. Use QPrintDialog to display a print dialog in your application.

class QAbstractPrintDialog ( printer [ , parent=None ] )
param parent

QWidget

param printer

QPrinter

构造抽象打印对话框为 printer with parent 作为父级 Widget。

PySide2.QtPrintSupport.QAbstractPrintDialog. PrintRange

用于指定打印范围选定选项。

常量

描述

QAbstractPrintDialog.AllPages

应打印所有页面。

QAbstractPrintDialog.Selection

Only the selection should be printed.

QAbstractPrintDialog.PageRange

The specified page range should be printed.

QAbstractPrintDialog.CurrentPage

Only the currently visible page should be printed.

另请参阅

PrintRange

PySide2.QtPrintSupport.QAbstractPrintDialog. PrintDialogOption

Used to specify which parts of the print dialog should be visible.

常量

描述

QAbstractPrintDialog.None

None of the options are enabled.

QAbstractPrintDialog.PrintToFile

The print to file option is enabled.

QAbstractPrintDialog.PrintSelection

The print selection option is enabled.

QAbstractPrintDialog.PrintPageRange

The page range selection option is enabled.

QAbstractPrintDialog.PrintShowPageSize

Show the page size + margins page only if this is enabled.

QAbstractPrintDialog.PrintCollateCopies

The collate copies option is enabled

QAbstractPrintDialog.PrintCurrentPage

The print current page option is enabled

该值从 Qt 4.5 起已过时且什么都不做:

常量

描述

QAbstractPrintDialog.DontUseSheet

In previous versions of Qt, exec() the print dialog would create a sheet by default the dialog was given a parent. This is no longer supported in Qt 4.5. If you want to use sheets, use open() 代替。

PySide2.QtPrintSupport.QAbstractPrintDialog. addEnabledOption ( option )
参数

option PrintDialogOption

使用 setOption ( option , true) 代替。

PySide2.QtPrintSupport.QAbstractPrintDialog. enabledOptions ( )
返回类型

PrintDialogOptions

使用 options() 代替。

PySide2.QtPrintSupport.QAbstractPrintDialog. fromPage ( )
返回类型

int

Returns the first page to be printed By default, this value is set to 0.

PySide2.QtPrintSupport.QAbstractPrintDialog. isOptionEnabled ( option )
参数

option PrintDialogOption

返回类型

bool

使用 testOption ( option ) 取而代之。

PySide2.QtPrintSupport.QAbstractPrintDialog. maxPage ( )
返回类型

int

Returns the maximum page in the page range. As of Qt 4.4, this function returns INT_MAX by default. Previous versions returned 1 by default.

PySide2.QtPrintSupport.QAbstractPrintDialog. minPage ( )
返回类型

int

Returns the minimum page in the page range. By default, this value is set to 1.

PySide2.QtPrintSupport.QAbstractPrintDialog. printRange ( )
返回类型

PrintRange

返回打印范围。

另请参阅

setPrintRange()

PySide2.QtPrintSupport.QAbstractPrintDialog. printer ( )
返回类型

QPrinter

Returns the printer that this printer dialog operates on.

PySide2.QtPrintSupport.QAbstractPrintDialog. setEnabledOptions ( options )
参数

options PrintDialogOptions

使用 setOptions() 代替。

另请参阅

enabledOptions()

PySide2.QtPrintSupport.QAbstractPrintDialog. setFromTo ( fromPage , toPage )
参数
  • fromPage int

  • toPage int

将打印对话框中的范围设为从 from to to .

PySide2.QtPrintSupport.QAbstractPrintDialog. setMinMax ( min , max )
参数
  • min int

  • max int

Sets the page range in this dialog to be from min to max . This also enables the PrintPageRange 选项。

PySide2.QtPrintSupport.QAbstractPrintDialog. setOptionTabs ( tabs )
参数

tabs

Set a list of widgets as tabs to be shown on the print dialog, if supported.

Currently this option is only supported on X11.

Setting the option tabs will transfer their ownership to the print dialog.

PySide2.QtPrintSupport.QAbstractPrintDialog. setPrintRange ( range )
参数

range PrintRange

Sets the print range option in to be range .

另请参阅

printRange()

PySide2.QtPrintSupport.QAbstractPrintDialog. toPage ( )
返回类型

int

Returns the last page to be printed. By default, this value is set to 0.