PDA

View Full Version : How to make a preview?



TomASS
20th February 2010, 16:39
Hi, I'm using a QPrinter to print my docs.

QPrinter printer;

printer.setFullPage(true);
printer.setPageSize(QPrinter::A4);
QPrintDialog dlg( &printer );
if( dlg.exec() != QDialog::Accepted ) return;

I'ld like to make a preview?
The only idea as I have is print to PDF, but it is not elegant

wysota
20th February 2010, 17:02
QPrintPreviewDialog

TomASS
20th February 2010, 18:24
I'm very sorry, I looked at the documentation, but I did not know that it is so simple

wysota
20th February 2010, 18:41
Don't be sorry. That's rather good and not bad ;)