You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
29 lines
602 B
Python
29 lines
602 B
Python
from PyQt5.QtCore import QThread, pyqtSignal
|
|
|
|
from communication import iomapping
|
|
from xps.ExploreTable import que1
|
|
|
|
|
|
class mythread(QThread):
|
|
my_sin = pyqtSignal(str)
|
|
|
|
def __init__(self):
|
|
super().__init__()
|
|
self.working = True
|
|
self.my_sin.connect(self.stop)
|
|
self.data = False
|
|
|
|
def __del__(self):
|
|
self.working = False
|
|
self.wait()
|
|
|
|
def run(self) -> None:
|
|
while True:
|
|
if self.data:
|
|
break
|
|
name = que1.get()
|
|
iomapping.set_Current(name)
|
|
|
|
def stop(self):
|
|
self.data = True
|