Qt:QWebview 在另一台机器上不显示 jpg、gif、png 图像
今天我在 QWebView 中遇到了一个非常奇怪的错误,我自己无法解决。
我在我的应用程序中包含了一个 QWebView
小部件。当我设置要显示的 URL 或一段 HTML 代码(使用 QWebView::setUrl()
或 QWebView::setHtml()
)时,它在我的机器。它也适用于所有安装了 Qt 的机器,但不适用于没有安装 Qt 的机器。我编译了一个发布版本并包含所有必需的共享库(QtWebKit4.dll、QtNetwork4.dll 等),所以我想我的错误在于我忘记包含一些图书馆。
如果有人已经遇到过这样的错误,我将非常感谢您的帮助!
Today I came across a very strange error with QWebView
which I cannot resolve myself.
I included a QWebView
widget in my application. When I set a URL or a piece of HTML code to display (with QWebView::setUrl()
or QWebView::setHtml()
), it works very well on my machine. It also works on all machines that have Qt installed, but not on those without it. I compiled a release build and included all necessary libraries as shared (QtWebKit4.dll, QtNetwork4.dll etc.), so I guess my error lies in that I forgot to include some libraries.
If anybody has already had such an error, I would be very grateful for help!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您可能需要包含相关的 Qt 图像处理插件库,这些库位于 qt/plugins/imageformats 中(也可能位于 qt/plugins/iconengines 中)。我还没有部署任何 webkit 应用程序,所以我对此不确定。
You might need to include the relevant Qt image processing plugin libraries, which are located in
qt/plugins/imageformats
(and maybe alsoqt/plugins/iconengines
). I haven't deployed any webkit apps, so I'm not certain about this.请参阅我对此问题的回答:Windows 上的 Qt dll 部署
See my answer to this question: Qt dll deployment on windows