With Qt 5.5 QWebEngine was introduced which will replace QWebKit. With Qt 5.6 (LTS) QWebKit is removed so that users have to use QWebEngine. Migration is quite easy except one thing: printing of webpages. This is not implemented and they hope to have it in Qt 5.7 (but perhaps even later). In other words: a mandatory function of Qt has ben removed without offering an replacement.
So my question: how can one print HTML/webpage content in recent versions of Qt?
- QTextDocument as container for HTML content could be used for printing but is way too limited
- QWebEngine does not offer a printing function
- doing a QWebEngineView->render(&printer) is a poor workaround because it prints only the visible part of the shown page (also when the page is much larger than the screen)
Is there a possibility in Qt one can recommend? Or any other (slim) tools that can be used for this and which support images, tables and CSS layouts?
Any idea and suggestion is welcome!