From 73d1122bf208f52d9bdb2e891dd1dca2b19c49c7 Mon Sep 17 00:00:00 2001 From: Irony <892768447@qq.com> Date: Sat, 5 Jan 2019 11:02:34 +0800 Subject: [PATCH 1/2] utf8 --- .settings/org.eclipse.core.resources.prefs | 1 + 1 file changed, 1 insertion(+) diff --git a/.settings/org.eclipse.core.resources.prefs b/.settings/org.eclipse.core.resources.prefs index 262f325..a18af8b 100644 --- a/.settings/org.eclipse.core.resources.prefs +++ b/.settings/org.eclipse.core.resources.prefs @@ -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 From a094e5ca50a4090d9785ed810eead1c01ed37499 Mon Sep 17 00:00:00 2001 From: Irony <892768447@qq.com> Date: Sat, 5 Jan 2019 21:36:08 +0800 Subject: [PATCH 2/2] remove QTimer --- QThread/moveToThread.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/QThread/moveToThread.py b/QThread/moveToThread.py index 84e05c7..ea1602d 100644 --- a/QThread/moveToThread.py +++ b/QThread/moveToThread.py @@ -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():