Hello,

So it would appear that in Qt 5.6 printing for the web engine isn't as straight forward as I had hoped. I've not yet been able to locate an example of how this should be accomplished and was looking to see if anyone here could provide an example.

Basically I'd like to invoke a preview of the page about to be presented so the end user can make adjustments, choose different printers, etc. and then print the page that is displayed in the current view of the web engine.

I was able to get something to print using the following ( based on a few pieced together examples ), but it was very tiny on the page.

Qt Code:
  1. QPrinter printer(QPrinter::HighResolution);
  2. QPainter painter;
  3. painter.begin(&printer);
  4. webEngineView->render(&painter);
  5. painter.end();
To copy to clipboard, switch view to plain text mode 

I didn't see anything obvious like a print function off the web view ( though that would be really nice ). I also did look at the QPrintPreviewDialogue, but wasn't sure how to incorporate it here.

So if anyone has implemented printing in 5.6 for the web engine view as described above, an example would be helpful. Thanks.