[Qt-interest] New Printing Features in Qt5?

John Layt john at layt.net
Thu May 19 19:02:30 CEST 2011


On Wednesday 18 May 2011 21:10:55 Andre Somers wrote:
> Would it make sense to make the API in such a way, that developers can
> easily extend the options in the standard dialog with new (pages of)
> advanced options, like booklet printing,
> two-sided-printing-on-one-sided-printers, N-up, etc.? That would mean
> API for both manipulating the printing dialog, and for being able to
> install a filter in the output chain somehow. However, you seem to know
> a *lot* more on this than I do, so I have no idea if this is realistic.
> 
> André

The dialog option already exists.  QAbstractDialog::setOptionTabs() supports 
adding any number of QWidgets as new tabs on the print dialog under *nix only.  
KDE apps do this a lot, for example our image apps add options to arrange and 
align the images on the page.  Both Windows and OSX have native api for adding 
tabs to their print dialogs but these are not supported by the Qt api and I 
need to investigate further if it will be possible to do so, i.e. I need to be 
able to add a QWidget to a Windows Property Sheet or an OS X Accessory View.  
QMacNativeWidget looks to do the job for OSX , but QWinWidget for Windows may 
not be available to use.

Putting filters in the chain is something KDE used to do in KDE3, but it's a 
feature Qt wasn't keen on so it's one we dropped.  It's possible to do if you 
have a common print file format, so pdf manipulation on OSX and Linux, but 
this breaks down on Windows unless you require Ghostscript to be installed and 
use that for printing instead.  The alternative of manipulating QPainter 
before the print file is generated seems a more portable technique.

Anyway, this is all getting way too technical for here, it's things I need to 
discuss over on the Qt5 list and at QCS.

Cheers!

John.



More information about the Qt-interest-old mailing list