In this article we will see how we can show the checked items in the text view(line edit) part of the combo box, we know in order to create the checkable items in the combo box we have to create a class of check-able combo box which inherits the combo box class and add the check-able items, but when we check items only the last item user check is visible in the text view part not all the check items are shown.
In order to show the selected items in the text view part, do the following –
1. Inside the check-able combo box class
2. Add function which get called when any item get check
3. Inside that function check which items are checked by iterating all the items
4. Show indexes of all the item to the combo box which are checked
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.