How to set a comboBox Text an empty string if the index is 0?
Solved
Qt for Python
-
I want to set a comboBox text to an empty string when the comboBox index is 0. I tried the code below but it exits my application. Please any help on what am doing wrong. Thanks in advance.
Check = " " qualification = self.ui.qualification_comboBox.currentText() if self.ui.qualification_comboBox.currentIndex() == 0: self.ui.qualification_comboBox.setCurrentText(Check)
-
@LT-K101 said in How to set a comboBox Text an empty string if the index is 0?:
I tried the code below but it exits my application
So, did you use debugger to see what happens and to provide stack trace here, so others can check what happens?
Also the string you're setting is not empty.