PyQt5 – Setting font to line editbox item of non-editable ComboBox
In this article we will see how to change the size and font of the item present in the editable box. 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.
Note : When we get the line edit object from the combo box it will make the combo box there fore there is a need to make the line edit non editable
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. Get the line edit(editable box) object from combo box
3. Change the font of the line edit using
4. Make the line edit non-editable(read-only)
Below is the implementation –
My Personal Notes arrow_drop_up
Please Login to comment...