Qt World Summit: Register Today!

Nokia Qt SDK and QT_NO_PRINTER define

  • It is looks like that default Qt binaries for Qt Simulator were built with QT_NO_PRINTER define. So for apps using printing (just to pdf maybe) Qt libs should be rebuilt as I understand. Does anybody know the reason for this define presence in prebuilt libraries?

  • The decision to define QT_NO_PRINTER has historical reasons AFAIR. Printing on embedded devices is not a very common task. Apart from generating PDFs, that's right.

    To work around you could wrap your QPrinter related code with QT_NO_PRINTER #ifdef's.

    Unfortunately you cannot just recompile Simulator Qt without QT_NO_PRINTER defined. Its configure that adds this define to mkspecs/qconfig.pri.

    If you think that this is something that should be fixed, then please file a report in our bug tracker.

  • I'm using eXaro library which is based on printing to pdfs so it is not really easy to wrap code :)
    If I will change this settings in sources and recompile Qt will it work or there are some problems with qprinter?

  • Enabling QT_NO_PRINTER and recompiling the libraries probably won't work. We skipped doing printing on Symbian (as we did with Windows CE) to limit the scope and didn't see it as common usecase.

    Generating a .pdf makes sense though, so I see your point.

    If I were you I'd look into other solutions for generating .pdfs on Symbian using Qt at the moment.

  • snowpong, as for simulator rebuilding helped me (I'm able to generate pdfs).

    About other way for pdfs generating. I'm not sure I'm ready to rewrite eXaro library, but if it will not work at some devices then maybe I will need to do it :)

Log in to reply