Hello everyone,
I have created QPushButton and make connection to a specific task. In addition to this task, I
would like to diable this pushbutton. Thus I add the following line just before the task but it won't work as I expected. The button is diabled after my task is done.

Code:
mypushbutton.setEnabled(False)
I have run my task

However when I remove my task. it work.
Code:
mypushbutton.setEnabled(False)
What is the problem here