Disabling QComboBox in pyqt

prattom picture prattom · Dec 9, 2013 · Viewed 10.8k times · Source

Is it possible to disable QComboBox in pyqt like we can do it in Win Forms(C#) since I could not find any option in the QComboBox manual. I want to enable QcomboBox only when admin logins.

Answer

prattom picture prattom · Dec 9, 2013

I found the answer to my question,

QComboBox.setEnabled(False) # disable comboBox

and

QComboBox.setEnabled(True) # enable comboBox