Results 1 to 4 of 4

Thread: Reg - QMap(Qt3.3.4)

  1. #1
    Join Date
    Aug 2006
    Location
    Chennai, India
    Posts
    34
    Thanks
    3
    Qt products
    Qt4
    Platforms
    Windows

    Default Reg - QMap(Qt3.3.4)

    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?

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    5,372
    Thanks
    28
    Thanked 976 Times in 912 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Reg - QMap(Qt3.3.4)

    Maybe you just want a list of pairs, not a map?

  3. #3
    Join Date
    Aug 2006
    Location
    Chennai, India
    Posts
    34
    Thanks
    3
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Reg - QMap(Qt3.3.4)

    I want the keys only in order what I insert.

  4. #4
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    5,372
    Thanks
    28
    Thanked 976 Times in 912 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Reg - QMap(Qt3.3.4)

    Quote Originally Posted by suresh View Post
    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).

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.