What I'm trying to do is directly print a widget.
How I have it right now is:
Qt Code:
p.setFullPage(true); this->ui->tabPersonal->render(&p);To copy to clipboard, switch view to plain text mode
It does print, but it is TINY! Any ideas?
What I'm trying to do is directly print a widget.
How I have it right now is:
Qt Code:
p.setFullPage(true); this->ui->tabPersonal->render(&p);To copy to clipboard, switch view to plain text mode
It does print, but it is TINY! Any ideas?
It's due to:
p.setPageSize(QPrinter::Letter); == 216 x 279 mm
and:
QPrinter::HighResolution; == 1200dpi / standard window screen dpi is around 96 WinXP and 72 - Lin <- AFAIR
Change QPrinter p(QPrinter::HighResolution); to : QPrinter p(QPrinter::ScreenResolution); for example.
To explain why that's happens (image is small in print) calculate:
my screen resolution = 1600x1200 in 1200dpi == 33.8x25mm
QPrinter::Letter = 216 x 279 mm
so my screen after print is approximately ten times smaller.
Regards
Bookmarks