How do you get the current text contents of a QComboBox?

You can convert the QString type to python string by just using the str
function. Assuming you are not using any Unicode characters you can get a python
string as below:

text = str(combobox1.currentText())

If you are using any unicode characters, you can do:

text = unicode(combobox1.currentText())

Leave a Comment