By default, QtWebKit is using a QNetworkAccessManager, which is the HTTP stack 
of QtNetwork.
If you want to replace it, you can set a custom QNetworkAccessManager.
http://doc.qt.nokia.com/latest/qwebpage.html#setNetworkAccessManager

________________________________________
From: [email protected] [[email protected]] 
On Behalf Of ext Yanke (Yon) Hu [[email protected]]
Sent: Tuesday, May 10, 2011 9:36 PM
To: [email protected]
Subject: [webkit-qt] Does WebKit have http connecting module?

hi,

I am a beginner of WebKit. It looks like WebKit doesn't have an API about 
setting proxy.

Previously when I was using Molliza sdk, I can set proxy by:

nsCOMPtr<nsIProtocolProxyService> proxyService =
        
do_GetService("@mozilla.org/network/protocol-proxy-service;1<http://mozilla.org/network/protocol-proxy-service;1>",
 &nrv);

An interesting thing is:  When you want to set proxy in Chrome or Safari, 
actually you are setting system level proxy. I guess the proxy module in Chrome 
and Safari is not related to WebKit module, but not sure.

I find in QT, you can set proxy in application by :

#include <QNetworkProxy>
……
QNetworkProxy * proxy = new QNetworkProxy();
proxy->setHostName("localhost");
proxy->setPort(8888);
proxy->setType(QNetworkProxy::HttpProxy);
QNetworkProxy::setApplicationProxy(*proxy);

Many QtWebKit based open source browser implement the proxy in this way. This 
module looks not related to QtWebKit, but belongs to QtCore.

So does this mean WebKit is just for rendering, and it doesn't have module for 
http conecting? I previously thought WebKit should have every module like 
Molliza Gecko. Browsers based on WebKit will just need to implement UI. But the 
thing doesn't look like this..

Thanks for any help!!

Cheers,
Yanke


--

Yanke Hu
phone: (469) 644-8799
email: [email protected]<mailto:[email protected]>
_______________________________________________
webkit-qt mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-qt

Reply via email to