[Development] Adding CPD support to Qt print dialog

Lars Knoll lars.knoll at qt.io
Fri Sep 16 07:32:43 CEST 2022


> On 16 Sep 2022, at 03:36, Chris Adams <chris.adams at qinetic.com.au> wrote:
> 
> Hi Gaurav,
> 
> First, I want to make clear: I know nothing about printing at all,
> either in Qt or in general.
> But I did a quick archive search and found the following:
> https://lists.qt-project.org/pipermail/development/2020-May/039584.html
> 
> On Fri, Sep 16, 2022 at 8:22 AM Gaurav Guleria <gaurav.gen3 at gmail.com> wrote:
>> 
>> Hello all,
>> 
>> I am Gaurav Guleria, a GSoC student, working with Till Kamppeter to add
>> and improve Common Print Dialog (CPD) support to existing print dialogs
>> like GTK and Qt. More about CPD can be read here:
>> https://openprinting.github.io/projects/04-print-dialog/.
>> 
>> I wanted to ask about your opinions on the implementation and the way we
>> should proceed with it. I talked with a few people and read this old
>> article here: https://wiki.qt.io/Qt-5-QtPrint, which suggests the Qt
>> team prefers CPD support as a plugin rather than a direct integration
>> into the QPrintDialog.
> 
> I might be misunderstanding his reply, but Lars seemed to suggest that
> he would have preferred CDB-related changes to live inside
> qtbase/src/printsupport rather than an add-on plugin.

That wiki page is somewhat outdated. In the end, it really depends on how the integration can be best handled. The goal should be that CPD support is transparent to the user of Qt, similar to how the native print or file dialogs work on other platforms. 

But the native print dialogs do currently all live inside Qt print support, so I don’t see why we shouldn’t add one more. 
> 
>> Just to summarize briefly, implementing CPD support directly in the
>> print dialog would mean that the Qt team wouldn't have to worry about
>> any future CUPS changes, or any other print backends for that matter, as
>> CPD will handle them all instead.

I am unsure whether we can get rid of CUPS and replace it with CPD, or whether we will need both side by side (and select the supported one at runtime). What’s the status here, are all Linux distributions nowadays supporting CPD? If yes, then we can either remove CUPS, or at least turn it into a compile time configuration option.
>> 
>> It would be really helpful if you could share your views on this and
>> give your suggestions.
> 
> Whatever path you end up taking, I wish you good luck and a successful project!

Good luck with this, it would be great to see finally have CPD support for Qt.

Cheers,
Lars

> 
> Best regards,
> Chris.
> 
> 
>> Thanks,
>> 
>> Gaurav
>> 
>> _______________________________________________
>> Development mailing list
>> Development at qt-project.org
>> https://lists.qt-project.org/listinfo/development
> _______________________________________________
> Development mailing list
> Development at qt-project.org
> https://lists.qt-project.org/listinfo/development



More information about the Development mailing list