Skip to content

Commit b4d575e

Browse files
committed
Merge branch 'master' of https://github.com/PyQt5/PyQt
2 parents 0cc9fbd + a094e5c commit b4d575e

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

.settings/org.eclipse.core.resources.prefs

+1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ encoding//Demo/FacePoints.py=utf-8
44
encoding//Demo/FollowWindow.py=utf-8
55
encoding//Demo/FramelessWindow.py=utf-8
66
encoding//Demo/Lib/Application.py=utf-8
7+
encoding//Demo/Lib/FramelessWindow.py=utf-8
78
encoding//Demo/NativeEvent.py=utf-8
89
encoding//Demo/Notification.py=utf-8
910
encoding//Demo/ProbeWindow.py=utf-8

QThread/moveToThread.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
@file: moveToThread
1010
@description: moveToThread
1111
"""
12-
from PyQt5.QtCore import QObject, pyqtSignal, QThread, QTimer
12+
from PyQt5.QtCore import QObject, pyqtSignal, QThread
1313
from PyQt5.QtWidgets import QWidget, QVBoxLayout, QProgressBar, QPushButton
1414

1515

@@ -52,8 +52,8 @@ def __init__(self, *args, **kwargs):
5252

5353
def onStart(self):
5454
print('main id', int(QThread.currentThreadId()))
55+
self._thread.started.connect(self._worker.run)
5556
self._thread.start() # 启动线程
56-
QTimer.singleShot(1, self._worker.run)
5757

5858
def closeEvent(self, event):
5959
if self._thread.isRunning():

0 commit comments

Comments
 (0)