I tried to delete all comboBox items using a loop as follow:
for idx in range(comboBox.count()):
print(idx, comboBox.count()) # show the loop number and check how many items left each loop
comboBox.removeItem(idx)
However, still 2 items left after the looping through all items instead of clearing them all out.
The prints are as following.
0 5
1 4
2 3
3 2
4 2
5 2
So it went haywire after 3. Why is this happening?