Qt:QWebview 在另一台机器上不显示 jpg、gif、png 图像 [英] Qt: QWebview not displaying jpg, gif, png images on another machines

查看:51
本文介绍了Qt:QWebview 在另一台机器上不显示 jpg、gif、png 图像的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

今天我在 QWebView 中遇到了一个非常奇怪的错误,我自己无法解决.

Today I came across a very strange error with QWebView which I cannot resolve myself.

我在我的应用程序中包含了一个 QWebView 小部件.当我设置要显示的 URL 或一段 HTML 代码时(使用 QWebView::setUrl()QWebView::setHtml()),它在我的机器.它也适用于所有安装了 Qt 的机器,但不适用于没有安装 Qt 的机器.我编译了一个发布版本并包含了所有必要的共享库(QtWebKit4.dllQtNetwork4.dll 等),所以我想我的错误在于我忘记包含一些图书馆.

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!

推荐答案

您可能需要包含相关的 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 also qt/plugins/iconengines ). I haven't deployed any webkit apps, so I'm not certain about this.

这篇关于Qt:QWebview 在另一台机器上不显示 jpg、gif、png 图像的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆