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.
- PyQt5 – Setting font to line editbox item of non-editable ComboBox
- PyQt5 - Setting line edit to the ComboBox
- PyQt5 - How to get line edit of ComboBox
- PyQt5 - Set skin to line edit part of combobox
- PyQt5 - Set skin to line edit part of non-editable combobox
- PyQt5 Combo Box – Different border width to line edit part
- PyQt5 QDoubleSpinBox – Setting Line Edit to it
- PyQt5 - Setting font to all the items in ComboBox
- PyQt5 - Setting role to item in ComboBox
- PyQt5 - Setting different toolTip to different item of ComboBox
- PyQt5 QComboBox – Change border style of line edit part
- PyQt5 QSpinbox - How to add line edit object to it
- PyQt5 QSpinbox - Accessing the line edit object of it
- PyQt5 QSpinBox - Adding background color to the line edit part
- PyQt5 QDoubleSpinBox – Getting Line Edit of it
- PyQt5 QCalendarWidget - Setting Date Edit (Pop-Up) Accept Delay Property
- PyQt5 QCalendarWidget - Setting Edit Focus Property
- PyQt5 QListWidget - Setting Edit Trigger Property
- PyQt5 QSpinBox - Matching font with the System Font
- PyQt5 - Getting the role of selected item in ComboBox
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to email@example.com. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.