In this article we will see how we can set the tool tip to the drop down part of the combo box. When we set tool tip to the combo box it only shows for the line edit part, tool tip is not visible for the drop down part i.e its view part.
In order set tool tip to the view part we have to do the following –
1. Create Combo box
2. Add items to the combo box
3. Get the view object of the combo box
4. Add tool tip to the view object
# getting view part of combo box view = self.combo_box.view() # setting tool tip to view object of the combo box view.setToolTip(tip)
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.