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

Popular posts from this blog

javascript - Using jquery append to add option values into a select element not working -

Android soft keyboard reverts to default keyboard on orientation change -

Rendering JButton to get the JCheckBox behavior in a JTable by using images does not update my table -