Results 1 to 2 of 2

Thread: QWebView unable to load a page when the content-type isn't set

  1. #1
    Join Date
    Mar 2011
    Posts
    2
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default QWebView unable to load a page when the content-type isn't set

    Hi there,

    I'm using a custom web server with a PyQt4 application that embeds a QWebView as a web browser.

    I've noticed that certain pages won't load and, by trial and error, found that if I force my web server to always set the content-type to 'text/html' I can get these pages to load.

    If I try to load these pages in another web browser (Chrome, Safari or Firefox) they work fine without any alterations to the server.

    Is there a way to set a default content-type for a QWebView? or is there another possible solution for this problem other that changing the server?

    Thanks in advance,
    Rory

  2. #2
    Join Date
    Mar 2011
    Posts
    2
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: QWebView unable to load a page when the content-type isn't set

    I feel like this must be a security feature or something similar. I've experimented with QWebSettings, but these don't affect the problem.

    Is it possible to put the QtWebKit module into a debug/logging mode to see if it outputs anything when one of these pages fail to load?

    Cheers,
    Rory

Similar Threads

  1. QwebView unable to load
    By asmncl in forum Qt Programming
    Replies: 2
    Last Post: 11th February 2011, 06:00
  2. Load in memory the content of a database
    By franco.amato in forum Qt Programming
    Replies: 24
    Last Post: 3rd January 2011, 17:21
  3. Replies: 1
    Last Post: 7th March 2010, 16:40
  4. Load textfile content into a textEdit
    By gt.beta2 in forum Newbie
    Replies: 1
    Last Post: 3rd March 2009, 22:57
  5. Unable to load jpg on Mac OS
    By sgmurphy19 in forum Qt Programming
    Replies: 14
    Last Post: 31st January 2008, 12:49

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.