[Qt-interest] QPrintPreviewDialog question
Robert Wood
robert.wood at apostrophe.co.uk
Tue Mar 9 19:39:45 CET 2010
I'm trying to print a little form I have designed. It's a form with a
QTextEdit placed on it; the QTextEdit is called "editor" and I have
populated it on-the-fly following one of the nice little supplied
examples and it looks grand.
I have invoked the QPrintPreviewDialog as follows:
QPrinter printer(QPrinter::HighResolution);
QPrintPreviewDialog ppd(&printer,ui->editor,Qt::Window);
ppd.exec();
This brings up a dialogue, that looks great other than the fact it's
empty! Do I completely misunderstand how this works? I had assumed I
should pass a pointer to the widget I want printing - in this case
"editor", the QTextEdit.
Am I close or barking in the wrong forest, let alone up the wrong tree?!
Many thanks,
Rob
PS All these emails about splitters is making me thing of Life of Brian
which is keeping a smile on my face. ;~)
More information about the Qt-interest-old
mailing list