[Qt-interest] QtWebKit content-type support
David Boddie
david.boddie at nokia.com
Tue Oct 27 13:54:31 CET 2009
Ingo Krabbe wrote:
> On Mon, Oct 26, 2009 at 12:39:32PM -0300, Joel A. Iturra P. wrote:
>> Hi everyone,
>>
>> Recently I found a client web page with wrong content-type ("text/HTML").
>> This content-type is not recognize by QtWebKit.
>>
>> There is any "not too complicated" way to add this content-type and treat
>> it like "text/html" ?
>
> I cannot find any documentation where the QtWebKit Module tries to detect
> the content type. As far as I know are mime-types case insesitive. So I
> would guess this a bug in the QtWebKit module or the surrounding software.
I can't say if this is a bug in QtWebKit but, if you need to change the way
content is loaded and recognized, you may want to look into creating a
custom QNetworkAccessManager subclass and using an instance of that to
handle network requests for QtWebKit.
I thought I'd put a related example on the Qt Centre Wiki at
http://wiki.qtcentre.org but apparently not. The closest thing I can find
right now is this example:
http://www.diotavelli.net/PyQtWiki/Using%20a%20Custom%20Protocol%20with%20QtWebKit
This doesn't do anything with the content type, but it shows how to replace
the standard QNetworkAccessManager with something else.
David
--
David Boddie
Senior Technical Writer
Nokia, Qt Development Frameworks
More information about the Qt-interest-old
mailing list