Consider the following code:
QMultiHash<int, Tag*>::iterator i = th.begin(); while(i != th.end()) {
int key = i.key();
Value* val = i.value();
if(key == lastkey) {
// Do something
}
else {
// Do Something else
}
}
Is the assumption that the entries with the same keys are returned consecutively by the iterator?
Thank you in advance.
Yes. See the code below demonstrating this.
main.cpp
Output