How can I set application wide proxy settings in Qt? -


i have posted efforts google maps display in webview. discovered needed install openssl https used of google apis.

that's , on different machine having touble configuring qt use system proxy. 1 have 1 system proxy not require authentication , 1 does. default proxy 1 require authentication.

i have following code specify proxy:

#include <qtgui/qguiapplication> #include "qtquick2applicationviewer.h" #include <qnetworkproxy>  int main(int argc, char *argv[]) {     qguiapplication app(argc, argv);      qnetworkproxy proxy;      proxy.settype(qnetworkproxy::httpproxy);      proxy.sethostname("url.of.proxy.not.requiring.authentication");      proxy.setport(8080);      qnetworkproxy::setapplicationproxy(proxy);      qtquick2applicationviewer viewer;     viewer.setmainqmlfile(qstringliteral("qml/maps/main.qml"));     viewer.showexpanded();      return app.exec(); } 

when run application web page displayed in webview contents state there error 407 because proxy requires authentication , proxy address specified in page default 1 , not 1 explicitly telling qt use.

how can qt use actual proxy want use? other apps on machine can use why not qt?

apparently qml webview doesn't use qt proxy settings. don't know if expected behavior or it's broken. try set http_proxy environment variable suggested in this discussion.


Comments

Popular posts from this blog

javascript - DIV "hiding" when changing dropdown value -

Does Firefox offer AppleScript support to get URL of windows? -

android - How to install packaged app on Firefox for mobile? -