[PyQt] Printing a widget

Jason H scorp1us at yahoo.com
Fri Jul 31 15:07:54 BST 2009


Check labs.trolltech.com They recently (since 4.5's release) had an article about improving rendering on higher DPI screens. Me thinks this would give you clues.




----- Original Message ----
From: Robert J. Hansen <rjh at sixdemonbag.org>
To: Jason H <scorp1us at yahoo.com>
Cc: pyqt at riverbankcomputing.com
Sent: Friday, July 31, 2009 12:03:24 AM
Subject: Re: [PyQt] Printing a widget

> Are you accounting for the higher DPI of printers (300, 600) vs that of the screen (72 or 90)? You'll need to scale accordingly.

I am not; thank you.  Now for a follow-up question: is there any way to programmatically discover the DPI of the screen?  QPrinter has a .resolution() which I'm assuming will give me the necessary DPI, but I don't know where I'd look in PyQt to find the screen DPI.

Once again, thanks for the answer to my question -- I hope you'll indulge another.  :)


      


More information about the PyQt mailing list