daudiam
14th October 2010, 16:17
I am trying to print a webpage by calling the print() function of class WebView. The steps were :
QPrinter printer;
QPrintDialog setup1(printer);
setup1.exec();
browser.print(printer); // browser is a QWebView object
1. When the QPrintDialog shows up, the name of the printer is not there which is understandable as there is no printer attached. The output file's name is also shown. But when I click on Print, the message is
"lp: Error - no default destination available."
QPrinter printer;
QPrintDialog setup1(printer);
setup1.exec();
browser.print(printer); // browser is a QWebView object
1. When the QPrintDialog shows up, the name of the printer is not there which is understandable as there is no printer attached. The output file's name is also shown. But when I click on Print, the message is
"lp: Error - no default destination available."