PyQt5 – How to hide the items from drop down box in Combo Box
In this article we will see how we can hide the items of the combo box from the drop down box i.e from view box. In order to do so we have to get the view object of combo box and had to hide it.
In order to hide the items we have to do the following steps –
1. Create Combo box
2. Add items to the combo box
3. Get the view object of combo box
4. Hide the view object
# getting view part of combo box view = self.combo_box.view() # hiding the view part view.setHidden(True)
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