- class QAbstractPrintDialog#
The
QAbstractPrintDialog
class provides a base implementation for print dialogs used to configure printers. More…Inherited by:
QPrintDialog
Synopsis#
Methods#
def
__init__()
def
fromPage()
def
maxPage()
def
minPage()
def
printRange()
def
printer()
def
setFromTo()
def
setMinMax()
def
setOptionTabs()
def
setPrintRange()
def
toPage()
Note
This documentation may contain snippets that were automatically translated from C++ to Python. We always welcome contributions to the snippet translation. If you see an issue with the translation, you can also let us know by creating a ticket on https:/bugreports.qt.io/projects/PYSIDE
Detailed Description#
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.See also
- class PrintRange#
Used to specify the print range selection option.
Constant
Description
QAbstractPrintDialog.AllPages
All pages should be printed.
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.
See also
- class PrintDialogOption#
(inherits
enum.Flag
) Used to specify which parts of the print dialog should be visible.Constant
Description
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
Constructs an abstract print dialog for
printer
withparent
as parent widget.- fromPage()#
- Return type:
int
Returns the first page to be printed By default, this value is set to 0.
- maxPage()#
- Return type:
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.
- minPage()#
- Return type:
int
Returns the minimum page in the page range. By default, this value is set to 1.
- printRange()#
- Return type:
Returns the print range.
See also
Returns the printer that this printer dialog operates on.
- setFromTo(fromPage, toPage)#
- Parameters:
fromPage – int
toPage – int
Sets the range in the print dialog to be from
from
toto
.- setMinMax(min, max)#
- Parameters:
min – int
max – int
Sets the page range in this dialog to be from
min
tomax
. This also enables thePrintPageRange
option.- setOptionTabs(tabs)#
- Parameters:
tabs – .list of QWidget
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.
- setPrintRange(range)#
- Parameters:
range –
PrintRange
Sets the print range option in to be
range
.See also
- toPage()#
- Return type:
int
Returns the last page to be printed. By default, this value is set to 0.