[Qt-interest] Server side printing

Mathias Waack Mathias.Waack at rantzau.de
Mon May 9 13:31:38 CEST 2011


Hello all, 

we've created a 3-thier application with Qt, server and client both using Qt. 
The server is (of course) a QCoreApplication, client a QApplication. Now we've 
encountered a problem generating pdf documents on the server. Its obviously 
easy to print into a pdf file, but regarding printing itself the docs about 
QPaintDevice say: 

Warning: Qt requires that a QApplication object exists before any paint 
devices can be created. Paint devices access window system resources, and 
these resources are not initialized before an application object is created.

Does it mean printing is not possible on the server side? Of course I could 
use something like Xvfb and turn my server into a QApplication, but this 
sounds more like a hack than a clean solution. Is there any other way to 
achieve my goal (with qt)?

Thanks, 

	Mathias



More information about the Qt-interest-old mailing list