I need to disable the button until the function is completed.
self.button_apply.clicked.connect(self.apply_clicked)
def apply_clicked(self):
"""Events when accept button is pushed"""
self.button_apply.setEnabled(False)
self.text_edit.append("button clicked")
QTimer.singleShot(1000, lambda: self.create_credentials_folder(self.samba_path_credentials))
self.button_apply.setEnabled(True)
It is not disabling the button.
The process should be: I click on button -> it gets disabled until all processes finished, but it is not disabling.