You should recalculate the speed each time you receive new data to provide better and better approximation of the average speed. How to approximate is up to you - you can either use the whole download history or only the recent part (i.e. last 10s of download). To store the statistics you can use a simple QMap<QTime,int> to store amounts of data downloaded during subsequent periods of time.
Bookmarks