Skip to content

Commit

Permalink
Merge pull request #85 from xdwgood/master
Browse files Browse the repository at this point in the history
BottomLineProgress.py:解决线程销毁bug
  • Loading branch information
892768447 authored Aug 21, 2019
2 parents c28e04d + 37194e4 commit 94d0726
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion QPushButton/BottomLineProgress.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
@description:
'''
from random import randint
import sys
import sys, time

from PyQt5.QtCore import QTimer, QThread, pyqtSignal
from PyQt5.QtGui import QPainter, QColor, QPen
Expand Down Expand Up @@ -82,6 +82,7 @@ def stop(self):
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()
Expand Down

0 comments on commit 94d0726

Please sign in to comment.