Hi JeanC. I was dealing with the same issue right now.

You can check the reply object to see if the status code is 301 (redirect). If so there's a redirection url attribute that would be set to the target URL.

Qt Code:
  1. QVariant replyStatus = reply->attribute(QNetworkRequest::HttpStatusCodeAttribute);
  2.  
  3. //! If needs to redirect - download from updated url
  4. if (replyStatus == 301)
  5. {
  6. QString redirectUrl = reply->attribute(QNetworkRequest::RedirectionTargetAttribute).toString();
  7.  
  8. // HERE - just use the url for creating a new request
To copy to clipboard, switch view to plain text mode