printing

How to print from QWebEngineView

梦想与她 提交于 2020-11-29 17:54:47
问题 I am trying to print a report from within my application, which involves both text and tables. Since QTextDocument won't be sufficient, I've decided to go with QWebEngineView and more sophisticated HTML/CSS which is not supported by the Qt rich text engine. I am able to create a PDF from the view, however I am having some general misconceptions, because at times its crashing, and also printing instead of PDF creation crashes. Here is my attempts: Approach 1: PDF creation This is the only