Commit ad7fdeac authored by Maxime Perrotin's avatar Maxime Perrotin

Add formatted line support

parent 8cc4b082
...@@ -29,11 +29,15 @@ class MyThread(QThread, QObject): ...@@ -29,11 +29,15 @@ class MyThread(QThread, QObject):
self.quit.emit() self.quit.emit()
return return
else: else:
self.signal.emit(line) try:
self.progress.emit(value) split = line.split()
value += 10 possible_val = split[0]
if value == 100: value = int(possible_val)
value = 0 text = ' '.join(split[1:])
self.progress.emit(value)
except (ValueError, IndexError):
text = line
self.signal.emit(text)
time.sleep(0.1) time.sleep(0.1)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment