Reputation: 636
In Qt, I'm trying to use the system proxy settings. This seems to work well, as long as I do not change them while the application is open.
Once I change the system proxy settings, I've got to close and re-open my application to pick up the new proxy settings.
This is documented in this bug here: https://bugreports.qt.io/browse/QTBUG-3470
Is there any known work-around for this issue? Is this solved in newer versions of Qt (the listed bug was filed against Qt 4.5)?
Upvotes: 4
Views: 1884
Reputation: 21897
From How do I get the system proxy using Qt?
QNetworkProxyQuery npq(QUrl("http://www.google.com"));
QList<QNetworkProxy> listOfProxies = QNetworkProxyFactory::systemProxyForQuery(npq);
Upvotes: 0
Reputation: 10961
You could peek at the System Registry values for the system proxy. This is quite straightforward (from what I understand) as Qt has the QSettings api which will give you quick access to the registry.
Check this link out for some info on the registry values.
Check this link out for some info/examples of QSettings.
Upvotes: 2