class Ui_MainWindow(object):
def setupUi(self, MainWindow):
....
# Threads
stop_threads = False
def TryPasswords(self, data):
if self.stop_threads: return
self.TryPasswords(data=data)
def startAction(self):
if self.start.text() == 'start':
# Start Threads
for i in range(self.horizontalSlider.value()):
t = threading.Thread(target=self.TryPasswords, args=(data,), daemon=True, name=str(i + 1).zfill(2))