1
[Solved]I’m pretty beginner in pyqt, mainly in python, I’m with a problem I looked at several foruns, how can I prevent the user from pressing the button multiple times in a row? I already tried using disable() and then enable again, tried to disconnect and then connect, even tried to use Hide(), but as my function scrolls in the same thread as the function ends it exceeded the "clickadas" I did during that time, I saw on the internet that I would have to make another thread for my function and in the main receive the disabled clickadas, but as I said I am very beginner in python and could not find anything specific, if someone could send me some material, or have another solution to my problem, I would appreciate it. my code:
self.botler_1.clicked.connect(lambda: self.sendData("$LM1"))
def sendData(self, text):
print("Sending data")
print(text)
You can try using disable to disable the button after clicking
– FourZeroFive
does not work, because the events of clciks were waiting for the buttons to be enabled again
– Jovem Cansado
Because you do not create a variable to count clicks and if it is bigger than 1 you ignore the click?
– gorn