Is there any way in Qt to query for windows proxy settings that could then be fed into QNetworkProxy::setApplicationProxy? I would like to be able to get and use the same proxy settings as internet explorer in my application.
Is there any way in Qt to query for windows proxy settings that could then be fed into QNetworkProxy::setApplicationProxy? I would like to be able to get and use the same proxy settings as internet explorer in my application.
It looks like QNetworkProxyFactory::systemProxyForQuery should work for this, but It is not returning the proxy that I expect.
Qt Code:
QNetworkProxyQuery q; q.setQueryType(QNetworkProxyQuery::UrlRequest); q.setProtocolTag("http"); QList<QNetworkProxy> proxies = QNetworkProxyFactory::systemProxyForQuery(q); else qDebug("No proxy server selected");To copy to clipboard, switch view to plain text mode
I always get back a single item in the list with NoProxy for type. Any ideas?
Turns out it works if you add a url to the query.
Bookmarks