I'd like to access a website using QNetworkReply and then extract the error from it. I'm most interested in seeing if the website was found or not. The below code always gives "Unknown Error" even when the website is perfectly fine. Has anyone done this before. I'm most thankful for your help.

Qt Code:
  1. QNetworkAccessManager* manager = new QNetworkAccessManager(this);
  2. connect(manager, SIGNAL(finished(QNetworkReply*)), this, SLOT(replyFinished(QNetworkReply*)));
  3. QNetworkReply* reply = manager->get(QNetworkRequest(QUrl("http://www.unknownhost123.com")));
  4. QString err = reply->errorString();//this err will be reported
To copy to clipboard, switch view to plain text mode