[Development] QtPrintSupport - Platform Support

morten.sorvig at nokia.com morten.sorvig at nokia.com
Mon Apr 30 11:06:28 CEST 2012


On Apr 28, 2012, at 5:38 PM, ext John Layt wrote:

Well I've tried doing this and ended up moving QCocoaPrinterSupport,
QQMacPrintEngine and QCoreGraphicPaintEngine all into the the printsupport
plugin as they are all only used by QtPrintSupport, and as the plugin returns
the native QPrintEngine as its main purpose so it seems logical.

Unfortunately, QCoreGraphicsPaintEngine needs to link against the Cocoa
platform plugin to use classes/methods in QCocoaAutoReleasePool and
QCocoaHelpers, but I can't figure out how to do that in qmake.  QtGui and
QtWidget both use these classes/methods as well, but I can't figure out how
they are linking against the Cocoa plugin.  Any hints on linking qtcocoa into
cocoaprintersupport, or is that just not possible?

That would be "not possible". QtGui and Widgets loads the Cocoa backend as a plugin and
does not link agains it.

I think the only options are either duplicating the neccesary code to support QCoreGraphicsPaintEngine in printsupport, or let it live in the cocoa plugin and "export" it using QCocoaNativeInterface.  I don't like duplicating code so we went with the latter approach.

Morten
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/development/attachments/20120430/182b7e97/attachment.html>


More information about the Development mailing list