1

I try open html page in QtWebKit with this sample:

import sys,os
from PyQt4 import QtGui,QtCore,QtWebKit

html = """
<img src="res/image.gif"/><br>
<img src="res/image.png"/><br>
<img src="res/image.jpeg"/>
"""
if __name__ == '__main__':
    app = QtGui.QApplication(sys.argv)
    view = QtWebKit.QWebView()
    frame = view.page().mainFrame()
    respath = ur'file:///%s/' % os.path.abspath('')
    view.setHtml(html,QtCore.QUrl(respath))
    view.show()
    app.exec_()

But when I run the program I only see the png image and can not see gif and jpeg.

Arty
  • 579
  • 1
  • 8
  • 17
  • 1
    Are you on Windows? If so, you're probably running into [this issue](http://www.qtcentre.org/threads/7335-Gif-Jpeg-plugin?s=245606b47f1a218b19096fb1132232ec&p=39539#post39539). – ekhumoro Aug 02 '16 at 15:00
  • Yes I am on windows. Thank you so much @ekhumoro. With your hint I found a solution. My problem is described [here](http://stackoverflow.com/questions/10477075/pyqt4-jpeg-jpg-unsupported-image-format/10669598). – Arty Aug 02 '16 at 18:27

0 Answers0