[Interest] QPrinter Support on Android

John Layt jlayt at kde.org
Mon Nov 11 10:06:33 CET 2013


On 11 November 2013 08:07, Thiago Macieira <thiago.macieira at intel.com> wrote:
> On domingo, 10 de novembro de 2013 21:34:08, Joshua Grauman wrote:
>> Hello all,
>>
>> I just tried Qt5.2 for Android and unless I'm missing something I can't
>> use QPrinter. Now I understand the reason for this, obviously there is no
>> printer backend on Android. However, when I used Qt 4.x for Android using
>> Bogdan's version, I was still able to use QPrinter and friends, and then I
>> can at least create a QPrintPreviewWidget, export to PDF, etc. Unless I'm
>> missing something this isn't possible with Qt 5.2 for Android. Does anyone
>> know more about this? Thanks!
>
> Are you sure it's disabled? I can't see anything in the build that would
> disable QtPrintSupport.

git grep "QT_NO_PRINTER" shows:

mkspecs/android-g++/qmake.conf:
    DEFINES                += QT_NO_PRINTER QT_NO_PRINTDIALOG
mkspecs/common/linux-android.conf:
    DEFINES                += QT_NO_PRINTER QT_NO_PRINTDIALOG
mkspecs/unsupported/android-g++/qmake.conf:
    DEFINES                += QT_NO_PRINTER QT_NO_PRINTDIALOG

So it's been disabled by the Android maintainers in the configure, you
will need to ask them why.  In the interim, if you're only needing to
write PDF's then we provide the QPdfWriter class for that purpose.  As
for proper print support in Android (IPP, CloudPrint, etc) then the
earliest I could see that happening is 5.4, i.e. at least a year away.

Cheers!

John.



More information about the Interest mailing list