PyQt5 – How to add multiple items to the ComboBox ?
In this article we will see how we can add multiple items to the combo box at single time. We know we can add item to the combo box with the help of addItem method but this method add only single item at a time. In order to add multiple items at a single time we have to use addItems method which will add all the items at once instead of one by one.
Syntax : combo_box.addItems(item_list)
Argument : It takes list as argument
Action performed : It will add all the list item to the combo box
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