View Full Version : QNetworkAccessManager and multiple progress bars
bigjoeystud
1st February 2011, 13:57
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
franz
1st February 2011, 15:57
What have you tried so far? Show us the code.
bigjoeystud
2nd February 2011, 03:19
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
Powered by vBulletin® Version 4.2.5 Copyright © 2024 vBulletin Solutions Inc. All rights reserved.