In this article we will see how we can add multiple of separator in between the items of the combo box, by default there is no separator. Separator is the black line in between two items, in order to add he separator we use
insertSeparator method. Below is representation of how combo box items with a separator looks like
In order to add multiple separator we will use
insertSeparator method multiple times but initial giving the index value of max index then second maximum index value and so on, if we first give the minimum index value then other statements will only increse the size of the minimum index vale separator.
For adding separator at two places only
Here, indexes is the list of two index
Argument : It takes integer as argument i.e index
Action performed : It will add separator at the given index
Below is the implementation –
- PyQt5 - How to add separator in between the item of ComboBox
- PyQt5 - Increase size of separator in between the item of ComboBox
- PyQt5 - How to add an item to the ComboBox ?
- PyQt5 – How to add multiple items to the ComboBox ?
- PyQt5 – How to add Separator in Status Bar ?
- PyQt5 - Getting the role of selected item in ComboBox
- PyQt5 - Getting the current index of selected item in ComboBox
- PyQt5 - Change the item at specific index in ComboBox
- PyQt5 - Setting role to item in ComboBox
- PyQt5 - Getting the text of selected item in ComboBox
- PyQt5 - Accessing role of item in ComboBox
- PyQt5 - Getting the content of item at specific index in ComboBox
- PyQt5 - Finding the item through text in ComboBox
- PyQt5 - Finding item through their role in comboBox
- PyQt5 - Adding item at given index in ComboBox
- PyQt5 - Get the icon of desired item in ComboBox
- PyQt5 - Get the icon size of item icon in ComboBox
- PyQt5 - Set icon size of item icon in ComboBox
- PyQt5 - How to set icon to the each item in ComboBox
- PyQt5 - How to get item delegate 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.