I have this class called HttpDownload Header / Source. It's basically a simple wrapper for QNetworkReply. The objects are created here when the user wants to open a new network link via the OpenDialog. That HttpDownload is then started here by calling its start method and added to a model that outputs to a QListView using a custom delegate. The QListView displays a progress bar for each HttpDownload which reports its progress via the model. It works. But if I then add another context menu here that lets you stop HttpDownload by calling a new method download->abort() whose implementation goes like this:
Qt Code:
void HttpDownload::abort() { if(reply->isFinished()) { return; } reply->abort(); emit updated(); }To copy to clipboard, switch view to plain text mode
Well that works too, however, after I've aborted one HttpDownload, all subsequent HttpDownloads won't start downloading. At all. They do nothing. So when I call the start method here, it won't start downloading. Any ideas? I've tried replacing reply->abort() with reply->close() but it does the same thing. Thanks.


Reply With Quote
Bookmarks