Results 1 to 2 of 2

Thread: QNetworkReply::HostNotFoundError

  1. #1
    Join Date
    Aug 2009
    Posts
    122
    Thanks
    74
    Qt products
    Qt4
    Platforms
    Windows

    Default QNetworkReply::HostNotFoundError

    What is the syntax to get QNetworkReply::HostNotFoundError back from QNetworkReply?

    First I generate a QNetworkReply like this:

    Qt Code:
    1. QNetworkAccessManager* nam = new QNetworkAccessManager(this);
    2. QNetworkReply* reply = nam->get(QNetworkRequest(url));
    To copy to clipboard, switch view to plain text mode 

    Then I know how to get QNetworkRequest::HttpStatusCodeAttribute from this QNetworkReply:

    Qt Code:
    1. QVariant statusCodeV = reply->attribute(QNetworkRequest::HttpStatusCodeAttribute);
    To copy to clipboard, switch view to plain text mode 

    How do I get QNetworkReply error in a similar fashion?? The prototype is here
    Qt Code:
    1. enum QNetworkReply::NetworkError
    To copy to clipboard, switch view to plain text mode 
    but I don't know how to use such prototype. What is the syntax. Thanks a lot for your help!

  2. #2
    Join Date
    Feb 2008
    Posts
    98
    Thanks
    2
    Thanked 24 Times in 24 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: QNetworkReply::HostNotFoundError

    Do you mean QNetworkReply::error() ?

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.