Results 1 to 3 of 3

Thread: QNetworkAccessManager and multiple progress bars

  1. #1
    Join Date
    Sep 2007
    Posts
    61
    Thanks
    5
    Thanked 4 Times in 4 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default QNetworkAccessManager and multiple progress bars

    I am trying to make a download manager similar to the queuing example included with Qt. However, rather than the queue, I just want the URLs to be downloaded in parallel. I want to have a GUI version which has multiple progress bars showing the progress of each of the downloads. QNetworkAccessManager will do the multiple downloading fine, but the progress signal from a single reply is not easily attached to a QList of QProgressBars.

    Maybe I'm thinking of this wrong, but how do I do this? I feel like this would be easy, but I'm having a heck of time wrapping my head around what I am needing.

    Thanks for any advice!

    Joey

  2. #2
    Join Date
    Jul 2009
    Location
    Enschede, Netherlands
    Posts
    462
    Thanked 69 Times in 67 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: QNetworkAccessManager and multiple progress bars

    What have you tried so far? Show us the code.
    Horse sense is the thing that keeps horses from betting on people. --W.C. Fields

    Ask Smart Questions

  3. #3
    Join Date
    Sep 2007
    Posts
    61
    Thanks
    5
    Thanked 4 Times in 4 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: QNetworkAccessManager and multiple progress bars

    Truthfully, I have working code with QHttp, but I was trying to switch to QNAM. I was creating a new thread for every request and then looping over each of the threads. Each thread was emitting a signal to update a progress bar which I kept in a QMap. This seems overly complicated and I was hoping to simplify it using QNAM.

    I was originally thinking of needing a QSignalMapper to map the signal from the QNetworkReply, but the signal sends two parameters and not one, so that's out. The other alternative was to subclass QNetworkReply and/or QNAM which seems like just as much work as I already have done.

    Has anyone else done something similar? A download manager seems common so I thought others might have something I could use as a starting point. I don't have any code yet, except for my old class which I am trying to replace.

    Joey

Similar Threads

  1. Widget to show multiple progress %ages in the same bar?
    By adith387 in forum Qt Programming
    Replies: 2
    Last Post: 7th January 2011, 17:02
  2. Downloading multiple files using QNetworkAccessManager
    By aurorius in forum Qt Programming
    Replies: 3
    Last Post: 7th August 2009, 10:51
  3. QNetworkAccessManager can't handle multiple cookies?
    By krippy2k in forum Qt Programming
    Replies: 5
    Last Post: 7th June 2009, 23:12
  4. QtItemDelegate for progress bars
    By maxpayne in forum Qt Programming
    Replies: 2
    Last Post: 19th November 2008, 13:26
  5. Not show the progress bars under another window
    By SkripT in forum Qt Programming
    Replies: 6
    Last Post: 13th March 2006, 17:22

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.