Merge branch 'master' of https://github.com/PyQt5/PyQt
This commit is contained in:
commit
b4d575e76e
2 changed files with 3 additions and 2 deletions
|
@ -4,6 +4,7 @@ encoding//Demo/FacePoints.py=utf-8
|
|||
encoding//Demo/FollowWindow.py=utf-8
|
||||
encoding//Demo/FramelessWindow.py=utf-8
|
||||
encoding//Demo/Lib/Application.py=utf-8
|
||||
encoding//Demo/Lib/FramelessWindow.py=utf-8
|
||||
encoding//Demo/NativeEvent.py=utf-8
|
||||
encoding//Demo/Notification.py=utf-8
|
||||
encoding//Demo/ProbeWindow.py=utf-8
|
||||
|
|
|
@ -9,7 +9,7 @@ Created on 2018年3月9日
|
|||
@file: moveToThread
|
||||
@description: moveToThread
|
||||
"""
|
||||
from PyQt5.QtCore import QObject, pyqtSignal, QThread, QTimer
|
||||
from PyQt5.QtCore import QObject, pyqtSignal, QThread
|
||||
from PyQt5.QtWidgets import QWidget, QVBoxLayout, QProgressBar, QPushButton
|
||||
|
||||
|
||||
|
@ -52,8 +52,8 @@ class Window(QWidget):
|
|||
|
||||
def onStart(self):
|
||||
print('main id', int(QThread.currentThreadId()))
|
||||
self._thread.started.connect(self._worker.run)
|
||||
self._thread.start() # 启动线程
|
||||
QTimer.singleShot(1, self._worker.run)
|
||||
|
||||
def closeEvent(self, event):
|
||||
if self._thread.isRunning():
|
||||
|
|
Loading…
Reference in a new issue