qt - Can QNetworkProxy::setHostname accept IP adresses? -
i have qnetworkproxy set hostname via
qnetworkproxy * currentproxy = new qnetworkproxy(); currentproxy->sethostname("123.234.123.234");
but not conenction. guess method not take ip adresses?
in standard qt examples use method like:
qnetworkproxy proxy; proxy.settype(qnetworkproxy::socks5proxy); proxy.sethostname("proxy.example.com"); proxy.setport(1080); proxy.setuser("username"); proxy.setpassword("password"); qnetworkproxy::setapplicationproxy(proxy);
but host name can passed ip address:
qnetworkproxy proxy; proxy.settype(qnetworkproxy::httpproxy); proxy.sethostname(qstring("http://192.168.1.1")); proxy.setport(8080); qnetworkproxy::setapplicationproxy(proxy);
you should check proper settings of system first of all.
Comments
Post a Comment