Results 1 to 3 of 3

Thread: Question about QNetworkReply from QNetworkAccessManager

  1. #1
    Join Date
    Jun 2008
    Location
    Germany/Belarus/Sweden
    Posts
    53
    Thanks
    3
    Thanked 1 Time in 1 Post
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Question Question about QNetworkReply from QNetworkAccessManager

    Hi peoples!
    I'm use QNetworkAccessManager to communicate with servers in net using get and post functions/methods of this class...
    Docu says what get and post functions
    returns a new QNetworkReply object
    ...
    Do I need to delete this QNetworkReply objects after the job is done, or the QNetworkAccesManager handle this?

    Should I
    Qt Code:
    1. delete reply; //reply is pointer on QNetworkReply object, obtained from QNetworkAccessManager->get() function
    To copy to clipboard, switch view to plain text mode 
    or not?

    Thanks in advance!

  2. #2
    Join Date
    Jan 2006
    Location
    Belgium
    Posts
    1,938
    Thanked 268 Times in 268 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows
    Wiki edits
    20

    Default Re: Question about QNetworkReply from QNetworkAccessManager

    It's all in the documentation ;-)

    Note: After the request has finished, it is the responsibility of the user to delete the QNetworkReply object at an appropriate time. Do not directly delete it inside the slot connected to finished(). You can use the deleteLater() function.

  3. The following user says thank you to tbscope for this useful post:

    AcerExtensa (18th June 2010)

  4. #3
    Join Date
    Jun 2008
    Location
    Germany/Belarus/Sweden
    Posts
    53
    Thanks
    3
    Thanked 1 Time in 1 Post
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default Re: Question about QNetworkReply from QNetworkAccessManager

    Thank you!
    Read Detailed Description and not only function description is a good idea

Similar Threads

  1. Replies: 2
    Last Post: 18th January 2012, 16:01
  2. Cannot get QNetworkCookie from QNetworkReply
    By MorrisLiang in forum Newbie
    Replies: 1
    Last Post: 25th May 2010, 17:59
  3. sending soap request using QNetworkAccessManager question
    By babymonsta in forum Qt Programming
    Replies: 10
    Last Post: 21st April 2010, 08:55
  4. QNetworkAccessManager question
    By _Stefan in forum Qt Programming
    Replies: 1
    Last Post: 5th March 2010, 13:21
  5. Replies: 2
    Last Post: 9th January 2010, 03:03

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.