0

I'm trying to access some url using QNetworkAccessManager and QNetworkRequest. Here is part of my code:

nam = new QNetworkAccessManager();
rep = nam->put(QNetworkRequest(myURL), myFile);

Sometimes it takes too long to establish the connection (because of some network related problems).
It there any way to change default connecting timeout for QNetworkAccessManager?

Ehsan Khodarahmi
  • 4,772
  • 10
  • 60
  • 87
  • 2
    Can't you just start a timer? Then see: if the timer fires before receiving the right signals from the reply, abort the reply; otherwise, stop the timer. – peppe May 21 '16 at 17:12
  • [link]http://stackoverflow.com/questions/13207493/qnetworkreply-and-qnetworkaccessmanager-timeout-in-http-request/13229926#13229926 – cyber_raj May 22 '16 at 15:01

0 Answers0