PDA

View Full Version : Qt 4.8.1: Printing from non-GUI thread is unavailable



BigFastAndrey
23rd April 2012, 08:25
Hello everybody.

Our project is based on Qt version 4.7.3 and everything works nice.
But several days ago we tried to port our solution to 4.8.1. One problem appears.
Application includes sophisticated report printing subsystem which performs painting in another (non-GUI) thread.

This warning appears in ouput and has a source in QPrinter insides:


QPixmap: It is not safe to use pixmaps outside the GUI thread

Printing of images doesn't work because of this.
Does anyone know the solutions? Excepting to perform printing from GUI-thread...

Thanks.

Spitfire
24th April 2012, 13:09
Start your app with
-graphicssystem raster.
In 4.8.x pixmap thread test was changed to prevent using pixmaps in non-gui thread for all graphics systems other than 'raster'.

BigFastAndrey
25th April 2012, 06:38
Thank you, it works!