I want to disable and later re-enable a bunch of QPushButtons and QRadioButtons. Disabling them using button.setEnabled(False) works perfectly, the button outline and label are greyed out and it's not clickable anymore.

However, after doing button.setEnabled(True) later, the outline returns from grey to white, but the label stays grey.

Did I miss something or is this a bug in Qt?

1 Answers

janp On Best Solutions


Turns out this problem is caused by me using multiple threads.

I solved the problem by switching from python threading to QThread and catching the started() / finished() signals of the new thread to disable/enable the UI elements.