
Originally Posted by
mikro
so "Four" will land on 0 because there is none before. But why then does "Two" manage to be on key 2 and not on 1?
Oh, that's simple, look:
comboBox->insertItem(4,"Four");
comboBox->insertItem(4,"Four");
To copy to clipboard, switch view to plain text mode
0: Four
comboBox->insertItem(2,"Two");
comboBox->insertItem(2,"Two");
To copy to clipboard, switch view to plain text mode
0: Four
1: Two
comboBox->insertItem(1,"One");
comboBox->insertItem(1,"One");
To copy to clipboard, switch view to plain text mode
0: Four
1: One (the item gets inserted inbetween Four and Two)
2: Two
comboBox->insertItem(3,"Three");
comboBox->insertItem(3,"Three");
To copy to clipboard, switch view to plain text mode
0: Four
1: One
2: Two
3: Three
comboBox->insertItem(5,"Five");
comboBox->insertItem(5,"Five");
To copy to clipboard, switch view to plain text mode
0: Four
1: One
2: Two
3: Three
4: Five
For me this does look as if they are actually trying to do as they say in the manual, but don't succeed.
They do, and they do succeed.
So i'd say it's a bug and at least people should be warned.
As you see it is not a bug, but a misjudgement or misunderstanding on your side 
BTW. It's an index, not an id.
Bookmarks