Reputation: 30895
i need to use Qtwebkit functions in GUI application but i do not want to view the webkit in my GUI app. the main function is to render HTML to pdf . i know i can do it with QtWebkit headless.
Upvotes: 0
Views: 498
Reputation: 12561
Use QWebPage since it can work without displaying anything on the screen. Something like:
QPrinter printer;
printer.setOutputFormat(QPrinter::PdfFormat);
printer.setOutputFileName(fileName);
page->mainFrame->print(&printer);
Upvotes: 1