Help regarding QNetworkProxy
-
Hi,
I am working on an application that make use of QNetworkProxy.
My problem is whenever I call QNetworkProxy::setApplicationProxy(proxy); my application hangs for sometime and then again becomes active. If I am using "Socks5Proxy" then it hangs for a long time and if I use "HttpProxy" then it hangs for a short time.
What could be the problem, where I may be wrong? I am calling the proxyload() function from my main class constructor,
Below is my code,@
client::client(QWidget *parent) :
QMainWindow(parent),
ui(new Ui::client)
{
ui->setupUi(this);
proxyload();
}
void client::proxyload()
{
proxy.setType(QNetworkProxy::Socks5Proxy);
proxy.setHostName("192.168.1.57");
proxy.setPort(1080);
//proxy.setUser("abc");
//proxy.setPassword("123");
QNetworkProxy::setApplicationProxy(proxy);
}@