Results 1 to 7 of 7

Thread: Multiple QNetworkRequests (post) with QNetworkNetworkAccessManager in a loop

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #2
    Join Date
    Mar 2015
    Posts
    4
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: Multiple QNetworkRequests (post) with QNetworkNetworkAccessManager in a loop

    Hi all,

    I see I could have clarified the structure of the method calls.

    The following happens:
    * The user clicks a button in the UI, which connects to the on_actionStart_Monitoring_All_Nodes_triggered() and it's "Stop" counterpart.
    * Either of these methods loops through all the Node elements in the system and calls the Sync::setMonitoring() method for each of these.
    * In the setMonitoring() method, the request is built and posted to the server.

    For clarification on how the QNetworkAccessManager is initiated I added the constructor for Sync. I also added the slot that the finished() signal from the QNetworkReply connects to, for completeness sake.

    I hope this makes it a bit easier to read.

    It's sometimes hard to write up these parts out of their context. For me at least .

    Looking forward to your thoughts.

    Tim
    Last edited by TimWoo; 20th October 2015 at 09:00. Reason: updated contents

Similar Threads

  1. How to use for loop to check multiple number of objects
    By gunturrohith in forum Qt for Embedded and Mobile
    Replies: 5
    Last Post: 9th September 2015, 09:01
  2. add multiple QCoombox using loop
    By uz_qt in forum Qt Programming
    Replies: 8
    Last Post: 27th September 2013, 11:24
  3. Replies: 1
    Last Post: 18th April 2012, 07:47
  4. Replies: 4
    Last Post: 6th August 2011, 01:40
  5. Replies: 6
    Last Post: 25th May 2010, 10:42

Tags for this Thread

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.