timmu
25th August 2009, 10:52
What is the syntax to get QNetworkReply::HostNotFoundError back from QNetworkReply?
First I generate a QNetworkReply like this:
QNetworkAccessManager* nam = new QNetworkAccessManager(this);
QNetworkReply* reply = nam->get(QNetworkRequest(url));
Then I know how to get QNetworkRequest::HttpStatusCodeAttribute from this QNetworkReply:
QVariant statusCodeV = reply->attribute(QNetworkRequest::HttpStatusCodeAttribute );
How do I get QNetworkReply error in a similar fashion?? The prototype is here
enum QNetworkReply::NetworkError
but I don't know how to use such prototype. What is the syntax. Thanks a lot for your help!
First I generate a QNetworkReply like this:
QNetworkAccessManager* nam = new QNetworkAccessManager(this);
QNetworkReply* reply = nam->get(QNetworkRequest(url));
Then I know how to get QNetworkRequest::HttpStatusCodeAttribute from this QNetworkReply:
QVariant statusCodeV = reply->attribute(QNetworkRequest::HttpStatusCodeAttribute );
How do I get QNetworkReply error in a similar fashion?? The prototype is here
enum QNetworkReply::NetworkError
but I don't know how to use such prototype. What is the syntax. Thanks a lot for your help!