PDA

View Full Version : QT-Default Proxy Configuration [Linux]



bmesing
7th August 2010, 18:12
Hello,

do I have to provide an application specific mechanism to configure the proxy server or
does QT provide a built-in way to set the ProxyServer for all QT-based applications (qtconfig does not allow to set it)? Or does it honor http_proxy environment variable by default?
IMO it's quite insane to have to provide configuration options in each network application..

Best regards

Aqualoom

bmesing
11th August 2010, 21:06
Any Ideas here? It would also be interesting to know, how this kind of thing is handled for windows. Does QT use the system (i.e. IE) proxy settings?

bmesing
17th April 2011, 19:54
For the record:

QNetworkProxyFactory::systemProxyForQuery()
should do what I need. Does not work for Linux though (QT 4.6) :(

ChrisW67
18th April 2011, 00:32
QNetworkProxyFactory::setUseSystemConfiguration() is probably closer unless you want to manually get a proxy setting each time you issue a request. As you say, it doesn't do anything useful on Linux, but it is trivial to have your program honour an environment variable if that is acceptable.