[Interest] Qt 5 Printer-specific options in QPrintDialog (Linux, CUPS)

Michael Weghorn m.weghorn at posteo.de
Fri Sep 11 13:05:59 CEST 2015

This is the source code I have used for testing on both, Qt 4 and Qt 5:

#include <QApplication>
#include <QPrinter>
#include <QPrintDialog>
#include <QPainter>

int main( int argc, char **argv )
  QApplication app( argc, argv );

  QPrinter printer;
  QPrintDialog dlg( &printer );
  if( dlg.exec() == QDialog::Accepted )
    QPainter painter( &printer );


  return 0;

On 2015-09-11 12:42, Michael Weghorn wrote:
> Hello,
> I have a question regarding changes in QPrintDialog between Qt 4 and Qt
> 5. I am running Debian GNU/Linux with CUPS as a printing system.
> Many printer models have printer-specific settings that are specified in
> a PPD file.
> When selecting a printer in QPrintDialog and pressing the "Properties"
> button, further settings can be made for the print job.
> In Qt 4, there was a tab called "Advanced" that contained all options
> from the printers PPD file, making it possible to set all of the
> printer-specific settings for the print job.
> In Qt 5, that tab no longer seems to be there. (There is, however, a new
> "Job Options" tab, which has different functionality). That means that
> it is no longer possible to set all options that the printer provides
> and thus make use of the device capabilites (like e.g. selecting a
> particular input tray, setting a PIN for a confidential print job,
> creating a booklet, ...).
> The second screenshot on Qt5's QPrintDialog documentation page [1] shows
> exactly the kind of dialog I am talking about (The window that has the
> title "PPD Properties").
> Therefore I am wondering whether there is possibly just an additional
> option that needs to passed or whether other additional steps are
> required to have these options displayed.
> Or is this dialog not available on GNU/Linux and CUPS in Qt 5? Has it
> possibly been removed in Qt 5?
> Best regards,
> Michael
> [1] http://doc.qt.io/qt-5/qprintdialog.html
> _______________________________________________
> Interest mailing list
> Interest at qt-project.org
> http://lists.qt-project.org/mailman/listinfo/interest

More information about the Interest mailing list