【问题标题】:How to capture entire webview for the printing如何捕获整个 web 视图以进行打印
【发布时间】:2013-04-22 07:05:16
【问题描述】:

我是 Qt 的新手。我只是想知道是否可以将整个qwebview 发送到打印机中。我不是在问源代码,而是

1) 有可能吗?

2) 有参考链接吗?

【问题讨论】:

    标签: qt qt4 qt5


    【解决方案1】:

    1) 是的,有可能

    2) 如 QWebView 文档中所述

    A QWebView can be printed onto a QPrinter using the print() function. 
    This function is marked as a slot and can be conveniently connected to 
    QPrintPreviewDialog's paintRequested() signal.
    

    【讨论】:

    【解决方案2】:

    1) 可以

    2) http://www.qtcentre.org/threads/25880-QWebView-prints-PDF-file-OK-with-QPrintDialog-only

    您也可以从 webview 获取 HTML 并采用其他一些打印技术。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2018-07-27
      • 2018-07-09
      • 1970-01-01
      • 1970-01-01
      • 2013-03-11
      相关资源
      最近更新 更多