Re: [PyQt] Printing a widget

2009-07-31 Thread Jason H
@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

[PyQt] Printing a widget

2009-07-30 Thread Robert J. Hansen
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

Re: [PyQt] Printing a widget

2009-07-30 Thread Jason H
] 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

Re: [PyQt] Printing a widget

2009-07-30 Thread Robert J. Hansen
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