Important: Please read the Qt Code of Conduct -

QWebKit unable to show images on external domains

  • Hi,

    I'm using QWebKit (haven't had time to look into upgradring to QWebEngine) to display a browser.
    But I'm having an issue where it does not load images that's on external computers.

    I've tried using http and https, but it just shows a "broken image"-icon.

    Using inspector and network, I get this:
    "Request URL:
    Request Method: GET
    Status Code: 200 OK 200 OK

    Request Headers
    User-Agent: Mozilla/5.0 (Windows NT 6.2; WOW64) AppleWebKit/538.1 (KHTML, like Gecko) Client Safari/538.1

    Response Headers
    Accept-Ranges: bytes
    Connection: keep-alive
    Content-Length: 78369
    Content-Type: image/jpeg
    Date: Wed, 13 Apr 2016 08:21:40 GMT
    Expires: Fri, 29 Apr 2016 03:23:49 GMT
    Last-Modified: Sun, 24 Jun 2012 01:43:23 GMT
    Server: nginx
    X-nc: HIT fra 3
    X-Orig-Src: 01_mogdir"

    So it appears to find the image, downloads it, but still can't display it.

    Any ideas?

    Thanks in advance.

    Best regards,

  • I was missing qjpeg and qgif in my imageformats folder - I added these and it works. :)

Log in to reply