I haven't studied the code that deeply, but this part stands out to me as a
potential problem:
class MainWindow(QMainWindow):
...
for i in downloadLink:
self.t=DownloadTask(i)
self.downloadTaskList.append(downloadTaskInfo(fileName=self.t.fileName,
speed=self.t.speedRate,
progress=self.t.downloadPart ))
You are creating each download instance, assigning over the top of the last
attribute on your class, and then passing only the values to your model. I
would assume that your model is now getting static values that are not changing
as the download proceeds. You probably want to either take my previous
suggestion of having your download object manage a progress bar, or, pass in
the whole download instance object to your model so you can keep checking live
attributes that are changing.
Be aware that you are still using multiple QNetworkAccessManagers instead of
just one for your application
Hope that helps,
On May 22, 2013, at 8:18 PM, iMath wrote:
> 在 2013年5月20日星期一UTC+8上午8时45分54秒,iMath写道:
>> I want to make a download tool .I use the following part code for
>> downloading
>>
>>
>>
>> see the code here
>>
>> http://qt-project.org/forums/viewthread/27934/
>>
>>
>>
>> now I am facing a problem :I don’t know how to reflect download progress
>> onto QtableView or QtableWidget ?especially downloading 2 or more files at
>> the same time . for instance ,how to reflect download progress onto this
>> QtableView ?
>>
>>
>>
>> http://postimg.org/image/7hr2xewof/
>>
>>
>>
>> here is 2 download audio link for test
>>
>>
>>
>> http://down.51voa.com/201305/syrian-strife-spilling-over-infecting-region.mp3
>> http://down.51voa.com/201305/us-military-sex-abuse-problem.mp3
>>
>>
>>
>> anyone can give a little sample ? thanks in advance !!!
>
> I have made this question more clear here ,can you have a look ,thank you !
> http://qt-project.org/forums/viewthread/27934/
>
> --
> You received this message because you are subscribed to the Google Groups
> "Python Programming for Autodesk Maya" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To post to this group, send email to [email protected].
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
--
You received this message because you are subscribed to the Google Groups
"Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.