PyQt5 – Finding the item through text in ComboBox
In this article we will see how we can find the item index with the help of text in it. We know we can add items with the help of
addItems method, in order to find the item with the help of
Syntax : combo_box.findText(text)
Argument : It takes string as argument.
Return : It return integer i.e index of text if text doesn’t exist it return -1
Below is the implementation –
Attention geek! Strengthen your foundations with the Python Programming Foundation Course and learn the basics.
To begin with, your interview preparations Enhance your Data Structures concepts with the Python DS Course. And to begin with your Machine Learning Journey, join the Machine Learning – Basic Level Course