@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
For a piece of code I'm working on, I need the ability to render a
QWidget to the printer directly. The logic goes something like this:
def printout(self):
widget = self.tab_widget.currentWidget()
if widget == None:
# The 'print' button should've been disabled;
# do so
] Printing a widget
For a piece of code I'm working on, I need the ability to render a QWidget to
the printer directly. The logic goes something like this:
def printout(self):
widget = self.tab_widget.currentWidget()
if widget == None:
# The 'print' button should've been disabled
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