Hi!

I might be dumb, but can't figure out this...
So I have a nice QTextEdit... I want to print it, as in the big book:

Qt Code:
  1. QPrinter printer;
  2. printer.setPageSize (QPrinter::A4); printer.setFullPage (true);
  3. QPrintDialog *dialog = new QPrintDialog (&printer, this);
  4. if (dialog->exec() != QDialog::Accepted) return;
  5. print (&printer);
To copy to clipboard, switch view to plain text mode 

I see it in the PDF file, it looks fine, but the margin is too big. Looks like the setFullPage(true) does nothing. I tried several stuff, a few to notice:

Change the document's margin and print that one:
http://trolltech.com/developer/knowl...17.5101025464/

Change printengine properity:
printer.printEngine()->setProperty(QPrintEngine::PPK_PaperRect, rect1);

If I try to print with the QPainter engine, it's fine and full page, just it's rather painful to work out with the painter.... and couldn't find a way to send the QTextEdit to painter.

Does anyone have any idea?