Q3Canvas Printing Problem on Windows XP, but OK on Solaris
Phil Weinstein, CADSWES, University of Colorado at Boulder, USA
UPDATE: 6-12-2008 -- Q3Table Printing has similar problem.
UPDATE: 6-18-2008 -- Trolltech
Bug Report (216354).
Qt4 Version: 4.3.3
Windows Platform: Microsoft Windows XP, Service Pack 2
On Windows, Q3Canvas Printing to a PDF file or to an actual printer is not working. (See images of correct output generated on Solaris, below). Canvas items are printed with reasonable font sizes, but the positions are very broken -- all overlapping in the top-left corner. It looks to be a scaling problem -- the relative positions of text (relative to each other) seem to be correct.
Sample Output Images / Files:
|
|
Simplified code snippet -- this produces almost the same results as shown. (This is without our code originally developed in Qt3 for multiple-page printing):
QPrinter printer (QPrinter::HighResolution); QPrintDialog printDlg (&printer, this); const int userResp = printDlg.exec(); if (userResp != QDialog::Rejected) { QPainter pPainter (&printer); Q3Canvas* actQCanvas = _activeCanvas->canvas(); QRect actQCanvasRect = actQCanvas->rect(); actQCanvas->drawArea (actQCanvasRect, &pPainter, false); } |