Alir3z4
5th December 2011, 06:06
Actually i couldn't find suitable title than this!
Okay i have a QTextBrowser which get output from QProcess and the output printed-out from "axel" downloader.
What i want to do is get just proggress text which is like [ #%]
the output is here
[ 0%] [0 ] [ 275.9KB/s] [ 2h06]
[ 22%] [0 ] [ 276.4KB/s] [ 2h06]
[ 34%] [0 ] [ 276.9KB/s] [ 2h06]
[ 43%] [0 ] [ 278.9KB/s] [ 2h05]
in try some regex pattern which i was failed in them.
\\d%
\\d{1,3}%
so if i can get the progress text then i can reach to download speed, remaining time and others i think.
i just want to show the download progress on the gui, of course i can calculate the download progress by orignal file size and downloaded size, but get help from regex seems more clever
Okay i have a QTextBrowser which get output from QProcess and the output printed-out from "axel" downloader.
What i want to do is get just proggress text which is like [ #%]
the output is here
[ 0%] [0 ] [ 275.9KB/s] [ 2h06]
[ 22%] [0 ] [ 276.4KB/s] [ 2h06]
[ 34%] [0 ] [ 276.9KB/s] [ 2h06]
[ 43%] [0 ] [ 278.9KB/s] [ 2h05]
in try some regex pattern which i was failed in them.
\\d%
\\d{1,3}%
so if i can get the progress text then i can reach to download speed, remaining time and others i think.
i just want to show the download progress on the gui, of course i can calculate the download progress by orignal file size and downloaded size, but get help from regex seems more clever