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

John Layt jlayt at kde.org
Fri Sep 11 16:47:25 CEST 2015

On 11 September 2015 at 13:37, Michael Weghorn <m.weghorn at posteo.de> wrote:

> thank you very much for the quick reply.

No problem, was lazily checking my mail on a Friday afternoon as I
wind down at work... :-)

> I estimate it quite a big issue in the migration to KDE 5/Qt 5 for us if
> all those printer-specific options cannot be set any more.

Yes, it's an issue for us inside KDE too, which is why I feel bad
about it stalling :-( I'm not sure we can even use the hack we used in
KDE4 anymore, where we inserted our own CUPS settings into the model
so they would be applied.

> In case we/I might consider contributing to a reimplementation:
> Have you already started making thoughts of how to implement it or maybe
> even started?
> In case any resources are available (git branch,...) I would be very
> glad to get more information.

Given the dependency tree of new features required to reach the end
point, a temporary implementation might be a better bet than waiting
for the new print system, i.e. reimplement the old extra page but
smarter. The main problem with the old page was it duplicated settings
from the main dialog, and hid the fact you could actually edit the
values. The UX I had in mind for Qt4 was to choose all the features
that could be supported directly in the main dialog and add them
there, then filter those out in the extra page in a generic editing
view. It would require a lot of work around parsing PPD's and matching
option codes to existing ui, but it's doable.

For working on the new print system backend and dialog, unfortunately
most of the details reside in my head, but there's a rough outline at:

 * https://wiki.qt.io/Qt-5-QtPrint
 * https://wiki.qt.io/Qt-contributors-summit-2014-QtPrintSupport
* http://lists.qt-project.org/pipermail/development/2014-January/014919.html

The main code lives in qtbase:

* qtbase/src/printsupport
* qtbase/src/plugins/printsupport

In particular the CUPS print dialog is at

* qtbase/src/printsupport/dialogs/qprintdialog_unix.cpp

I have various experimental branches on my hard drive and previously
on Gitorious, but nothing progressed enough to really push anywhere
though, but I'll try have a poke around this weekend to see if there's
something useful.



More information about the Interest mailing list