preparing call to autoPyLoT from QtPyLoT
This commit is contained in:
parent
1bee360bbb
commit
120f2743d2
BIN
icons/sync.png
Executable file
BIN
icons/sync.png
Executable file
Binary file not shown.
After Width: | Height: | Size: 4.2 KiB |
19
pylot/core/util/thread.py
Normal file
19
pylot/core/util/thread.py
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
import sys
|
||||||
|
from PySide.QtCore import QThread, Signal
|
||||||
|
|
||||||
|
class WorkerThread(QThread):
|
||||||
|
message = Signal(str)
|
||||||
|
|
||||||
|
def __init__(self, func, data, param):
|
||||||
|
super(WorkerThread, self).__init__()
|
||||||
|
self.func = func
|
||||||
|
self.data = data
|
||||||
|
self.param = param
|
||||||
|
|
||||||
|
def run(self):
|
||||||
|
sys.stdout = self
|
||||||
|
|
||||||
|
self.func(self.data, self.param)
|
||||||
|
|
||||||
|
def write(self, text):
|
||||||
|
self.message.emit(text)
|
Loading…
Reference in New Issue
Block a user