PDA

View Full Version : Does QTWebkit initialize proxy setting from the system variable if provided?



sushmacr
28th June 2010, 14:12
Hello All,

I have a browser which is working with proxy settings (::setHostName(), ::setPort()) and QNetworkAccessManager setProxy() done in the browser implementation code.
I want to use the http_proxy environment variable for setting the proxy instead of performing the setting in the browser implementation code. If hostName or port number needs to change then it will need code recompiling where as "export http_proxy=" can be done from command line.
Does QTWebkit initialize from the system variable if provided?

daemonna
28th June 2010, 22:50
if you want to read system wide setting, first get it from OS, then set it thru setProxy()..

sushmacr
1st July 2010, 08:30
How do i get the parameters from OS, specifically hostname and port number?

sushmacr
1st July 2010, 13:54
I found the solution
check out http://blog.mrcongwang.com/2009/07/21/applying-system-proxy-settings-to-qt-application/