PyQt5 – Setting font to the item in line edit box of ComboBox
In this article we will see how we can change the size and font of the item present in the editable. If we use
setFont method which takes
QFont object as argument, using it with the check box object will change the font of all the items present in the list.
In order to change the font and size of only the item which is in the editable box, do the following –
1. Create a combo box
2. Make it editable combo box(optional)
3. Get the line edit(editable box) object from combo box
4. Change the font of the line edit using
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