In this article we will see how we can set the background color to the line edit part of combo box, line edit part of the combo box is in which text is shown and edit.
In order to add background color to the line edit part of the combo box, do the following –
1. Create a combo box 2. Create a line edit widget 3. Change background color of the line edit widget 4. Add line edit widget to the combo box
# creating line edit widget
line_edit = QLineEdit()
# setting background color to the line edit widget
"background : lightblue;"
# adding line edit widget to combo box
Please Login to comment...