Disabling QComboBox in pyqt

Is it possible to disable QComboBox in pyqt, how can we 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 login.

+4
source share
2 answers

I found the answer to my question,

QComboBox.setEnabled(False) # disable comboBox

and

QComboBox.setEnabled(True) # enable comboBox 
+6
source

You can also do:

QComboBox.setDisabled(True)
QComboBox.setDisabled(False)
+1
source

All Articles