Results 1 to 3 of 3

Thread: QNetworkAccessManager and multiple QNetworkReply

  1. #1
    Join Date
    Aug 2012
    Posts
    1
    Qt products
    Qt4
    Platforms
    Windows

  2. #2
    Join Date
    May 2012
    Posts
    136
    Thanks
    2
    Thanked 27 Times in 24 Posts
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: QNetworkAccessManager and multiple QNetworkReply

    If you connect both slots to one signal they always both get called
    why do you want to handle the finished signal in two different slots?

  3. #3
    Join Date
    Oct 2009
    Posts
    483
    Thanked 96 Times in 93 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: QNetworkAccessManager and multiple QNetworkReply

    When a QNetworkReply finishes, two signals are emitted:
    1. the QNetworkAccessManager's finished() signal with a pointer to the QNetworkReply as its argument,
    2. the QNetworkReply's finished() signal with no argument.

    Clearly the first signal is the same for all QNetworkReplies and is therefore suitable for a uniform treatment such as updating a status bar, while the second signal is specific to the QNetworkReply instance and is therefore adapted to a reply-specific treatment, which is exactly what you are trying to achieve here.

Similar Threads

  1. Replies: 2
    Last Post: 18th January 2012, 15:01
  2. Replies: 11
    Last Post: 10th February 2011, 00:38
  3. Replies: 3
    Last Post: 26th October 2010, 22:52
  4. Replies: 2
    Last Post: 18th June 2010, 11:04
  5. Replies: 2
    Last Post: 9th January 2010, 02: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.