I have a ComboBox with different values inside: Yes, No.

Can I set the ComboBox by a value I receive from an input? I don't want to set it by index#. I also want to try to stay away from if statements.

[![enter image description here](https://i.stack.imgur.com/eW3OO.png)](https://i.stack.imgur.com/eW3OO.png)

I've tried something like this:

```
    self.UnlHE_Drop = QtWidgets.QComboBox(self.scrollAreaWidgetContents)
    self.UnlHE_Drop.setObjectName("UnlHE_Drop")
    self.UnlHE_Drop.addItem("")
    self.UnlHE_Drop.setItemText(0, "")
    self.UnlHE_Drop.addItem("")
    self.UnlHE_Drop.addItem("")

def retranslateUi(self, VlS):
    _translate = QtCore.QCoreApplication.translate
    VlS.setWindowTitle(_translate("VlS", "Value"))
    self.UnlHE_Drop.setItemText(1, _translate("VlS", "Yes"))
    self.UnlHE_Drop.setItemText(2, _translate("VlS", "No"))
    self.UnlHE_DropInfo = QInputDialog.getText(None, 'Answer:', 'Yes or No:')
    self.UnlHE_Drop.setCurrentIndex(self.UnlHE_Drop.findText(self.UnlHE_DropInfo))

```