In this article we will see how we can adjust the combo box according to the size of item according to item which has maximum size among the item list. By default we use
setGeometry method and
setSize method to adjust the size but it will not automatically adjust the size according to the item size.
In order to adjust the size according to the maximum length item size we use
Syntax : combo_box.adjustSize()
Argument : It takes no argument
Return : None
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