From 37194e4e76b6686d34c97818d619abb93ae18ac3 Mon Sep 17 00:00:00 2001 From: Pandacoolcool <1308455330@qq.com> Date: Wed, 21 Aug 2019 11:11:20 +0800 Subject: [PATCH] =?UTF-8?q?BottomLineProgress.py=EF=BC=9A=E8=A7=A3?= =?UTF-8?q?=E5=86=B3=E7=BA=BF=E7=A8=8B=E9=94=80=E6=AF=81bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- QPushButton/BottomLineProgress.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/QPushButton/BottomLineProgress.py b/QPushButton/BottomLineProgress.py index 491124f..b78ec99 100644 --- a/QPushButton/BottomLineProgress.py +++ b/QPushButton/BottomLineProgress.py @@ -10,7 +10,7 @@ Created on 2018年2月1日 @description: ''' from random import randint -import sys +import sys, time from PyQt5.QtCore import QTimer, QThread, pyqtSignal from PyQt5.QtGui import QPainter, QColor, QPen @@ -82,6 +82,7 @@ class PushButtonLine(QPushButton): self.loadingThread.valueChanged.disconnect(self.setPercent) self.loadingThread.terminate() self.loadingThread.deleteLater() + time.sleep(1) #延迟等待deleteLater执行完毕 del self.loadingThread self._percent = 0 self._timer.stop()