void myHttp::slotRun(){ QString rez="success"; QFile file("OKATO89.sav"); QHttp http; QNetworkProxy proxy; proxy.setType(QNetworkProxy::Socks5Proxy);//HttpProxy); proxy.setHostName(QString("90.150.83.ххх")); proxy.setPort(8080); QNetworkProxy::setApplicationProxy(proxy);// http.setProxy("90.150.83.ххх",8080); //не идет-выдает Unknown error// qDebug()<<http.errorString(); if(file.open(QIODevice::WriteOnly)) { http.setHost("fin.yamalfin.ru"); http.get("/rbs/update/OKATO89.zip",&file); http.close(); file.close(); } else { rez="can't open file"; } if(!http.errorString().isEmpty()) { rez="error: "+http.errorString(); } ui->l_rez->setText(rez);}
QHttp http; QNetworkProxy proxy; proxy.setType(QNetworkProxy::Socks5Proxy);//HttpProxy); proxy.setHostName(QString("90.150.83.ххх")); proxy.setPort(8080); QNetworkProxy::setApplicationProxy(proxy); http.setProxy("90.150.83.ххх",8080);