【问题标题】:QWebView shows raw html in some casesQWebView 在某些情况下显示原始 html
【发布时间】:2016-07-12 09:43:45
【问题描述】:

我正在使用以下代码。

QWebView *lpView = new QWebView(*%parent_widget%*);
lpView->load(QUrl(*%path_to_html%*));

使用some pages 可以正常工作并显示渲染页面。而on others 则显示原始 html。

我怀疑问题出在 html 页面的内容上,但我无法确定究竟是什么破坏了 QWebView 中的渲染。

【问题讨论】:

    标签: html qt qwebview


    【解决方案1】:

    问题在于编码。未加载的页面是 UTF-8 和 BOM,QWebViewer 需要纯 UTF-8。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2018-08-13
      • 1970-01-01
      • 2016-07-31
      • 1970-01-01
      • 2014-07-16
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多