Trolltech Support was able to reproduce these printing problems with Q3Canvas and Q3Table, apparently in Qt 4.4. See Bug Number 216354 on http://trolltech.com/developer/task-tracker/ .
Trolltech Support was able to reproduce these printing problems with Q3Canvas and Q3Table, apparently in Qt 4.4. See Bug Number 216354 on http://trolltech.com/developer/task-tracker/ .
As I now understand ... A QPrinter should NEVER be created with QPrinter::HighResolution if it is to be used to print (i.e. "draw" to a QPrinter) any widgets (e.g. Q3Canvas or Q3Table) that are displayed on the screen.
Unfortunately, the deprecated Qt3 QPrinter::PrinterResolution value is interpreted as QPrinter::HighResolution ON WINDOWS. (On Solaris, it is instead interpreted as QPrinter::ScreenResolution -- so use of that deprecated value didn't have any problems).
Part of my confusion was that there is no indication that QPrinter::HighResolution is not to be used for printing widgets (not stated in the documentation). AND the documentation for "ScreenResolution" states that that "should only be used for drafts". [It needs to be used for printing ALL widgets created within the GUI].
An additional source of confusion was that, using the sample code shown for Q3Canvas::drawArea, with the printer configured with "ScreenResolution" the output is just one page, and is generally blank if the canvas size is large, as ours is. But as it turns out, when using our slightly substantial application code designed to create multiple output pages with only the portion of the canvas containing actual objects, printing works -- when the deprecated "PrinterResolution" value is replaced with "ScreenResolution" (needed on Windows; effectively automatic on Solaris).
Ref: http://doc.trolltech.com/4.3/qprinte...interMode-enum
Bookmarks