Qt: QWebview not displaying jpg, gif, png images on another machines

我怕爱的太早我们不能终老 提交于 2019-12-10 16:18:42

问题


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!


回答1:


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.




回答2:


See my answer to this question: Qt dll deployment on windows



来源:https://stackoverflow.com/questions/5911232/qt-qwebview-not-displaying-jpg-gif-png-images-on-another-machines

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!