-
Notifications
You must be signed in to change notification settings - Fork 0
/
ThreadChangedIconColor.py
30 lines (22 loc) · 1001 Bytes
/
ThreadChangedIconColor.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
from PyQt5.QtCore import QRunnable, QObject, pyqtSignal, QTimer
class Signals(QObject):
return_signal = pyqtSignal(str)
class ThreadChangedIcon(QRunnable):
signal = pyqtSignal(str)
def __init__(self, ui):
super(ThreadChangedIcon, self).__init__()
self.signal = Signals()
self.ui = ui
def run(self):
# time.sleep(5)
result = "Some String"
# self.ui.modifyGlobalVariablesObj.setChangedImage()
self.ui.modifyGlobalVariablesObj.setChangedLightColor()
# ======================= Login UI ==========================================================================
self.signal.return_signal.emit(result)
def function_thread(self, signal):
# QTimer.singleShot(2000, lambda: self.settings_dialog_set_ui.applyColor.setDisabled(False))
# self.allChangeToolButtonAttributeColor(self.alldisplayColorChangeObj)
# self.threadpool.destroyed()
print("My Goodness")
print(signal)