Python PySide2.QtCore.QThread() Examples

The following are 1 code examples of PySide2.QtCore.QThread(). You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may also want to check out all available functions/classes of the module PySide2.QtCore , or try the search function .
Example #1
Source File: loaders.py    From pylash_engine with MIT License 4 votes vote down vote up
def load(self, path):
		self._loadingThread = QtCore.QThread(stage.canvasWidget)
		worker = self._ImageLoaderWorker(path)
		worker.moveToThread(self._loadingThread)
		worker.resultReady.connect(lambda img: self._onLoadWorkerComplete(img))
		self._loadingThread.started.connect(lambda: worker.doLoad())
		self._loadingThread.finished.connect(lambda: worker.deleteLater())
		self._loadingThread.start()