PDA

View Full Version : Reg - QMap(Qt3.3.4)



suresh
18th October 2006, 20:55
I insert the values into QMap by QString as a key.

I take all keys by using keys() function. It returns all keys what I inserted. But my problem is it gives the keys by sorted form. But I want what the order I inserted. Anyother way to get the keys?

jacek
18th October 2006, 21:07
Maybe you just want a list of pairs, not a map?

suresh
18th October 2006, 21:15
I want the keys only in order what I insert.

jacek
18th October 2006, 22:04
I want the keys only in order what I insert.
Then use QList< QPair< QString, QSomething > >, but this will affect the lookup speed (you don't have to worry about it, if you don't pick random items).