Results 1 to 4 of 4

Thread: Q3Canvas Printing Problem on Windows XP, but OK on Solaris

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Jun 2008
    Location
    Boulder, Colorado, USA
    Posts
    70
    Qt products
    Qt5
    Platforms
    Unix/X11 Windows
    Thanks
    16
    Thanked 1 Time in 1 Post

    Default Q3Canvas and Q3Table Printing Problem on Windows XP, but OK on Solaris

    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/ .

  2. #2
    Join Date
    Jun 2008
    Location
    Boulder, Colorado, USA
    Posts
    70
    Qt products
    Qt5
    Platforms
    Unix/X11 Windows
    Thanks
    16
    Thanked 1 Time in 1 Post

    Default Re: Q3Canvas Printing Problem on Windows XP, but OK on Solaris

    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

Similar Threads

  1. Printing problem in windows
    By joseph in forum Qt Programming
    Replies: 6
    Last Post: 12th July 2007, 08:04

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Qt is a trademark of The Qt Company.