История изменений
Исправление fang90, (текущая версия) :
Суть проблемы - интерфейс подвисает,
QThread
try:
import thread
except ImportError:
import _thread as thread
А что это, что за хрень?!
В общем, просто делаешь так
waitthread = ParseComThread()
waitthread.parent = self
waitthread.notifyProgress.connect(self.update_data)
waitthread.start()
class ParseComThread(QtCore.QThread):
notifyProgress = QtCore.pyqtSignal(str)
def run(self):
some_magic_with_comPort()
self.notifyProgress.emit('magic found')
Исправление fang90, :
Суть проблемы - интерфейс подвисает,
QThread
try:
import thread
except ImportError:
import _thread as thread
А что это, что за хрень?!
В общем, просто делаешь так
waitthread = ParseComThread()
waitthread.parent = self
waitthread.notifyProgress.connect(self.update_data)
waitthread.start()
class ParseComThread(QtCore.QThread):
notifyProgress = QtCore.pyqtSignal(dict)
def run(self):
some_magic_with_comPort()
self.notifyProgress.emit('magic found')
Исправление fang90, :
Суть проблемы - интерфейс подвисает,
QThread
try:
import thread
except ImportError:
import _thread as thread
А что это, что за хрень?!
В общем, просто делаешь так
waitthread = ParseComThread()
waitthread.parent = self
waitthread.notifyProgress.connect(self.update_data)
waitthread.start()
class ParseAnswersThread(QtCore.QThread):
notifyProgress = QtCore.pyqtSignal(dict)
def run(self):
some_magic_with_comPort()
self.notifyProgress.emit('magic found')
Исходная версия fang90, :
Суть проблемы - интерфейс подвисает,
QThread
try:
import thread
except ImportError:
import _thread as thread
А что это, что за хрень?!
В общем, просто делаешь так
waitthread = ParseComThread()
waitthread.parent = self
waitthread.notifyProgress.connect(self.update_data)
class ParseAnswersThread(QtCore.QThread):
notifyProgress = QtCore.pyqtSignal(dict)
def run(self):
some_magic_with_comPort()
self.notifyProgress.emit('magic found')