On Windows, Q3Canvas Printing to a PDF file or to an actual printer is not working. 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. On Solaris though, printing is working properly.
SEE IMAGES: http://cadswes2.colorado.edu/~philw/...Q3CanvPrtProb/
Qt4 Version: 4.3.3
Windows Platform: Microsoft Windows XP, Service Pack 2
Simplified code snippet (similar results):
const int userResp = printDlg.exec();
{
Q3Canvas* actQCanvas = _activeCanvas->canvas();
QRect actQCanvasRect
= actQCanvas
->rect
();
actQCanvas->drawArea (actQCanvasRect, &pPainter, false);
}
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);
}
To copy to clipboard, switch view to plain text mode
Bookmarks