PDA

View Full Version : Printing with QWebView



Vnuce
7th April 2010, 12:59
I'm trying to print a generated HTML document and on first try it works great. But, only on the first try. When I try to print for the second time, the print job isn't even sent to the spool queue.
Anyone else has had similar trouble?
Here's an exempt of the code I'm using...



_ui.web_view->load(_tmp_url);
QPrinter printer(QPrinterInfo::defaultPrinter());
printer.setCreator("Foo Bar");
printer.setDocName("Foo Bar");
printer.setNumCopies(_ui.spin_copies->value());
_ui.web_view->print(&printer);