Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Does Qt has any unordered containers?
Forum Updated to NodeBB v4.3 + New Features

Does Qt has any unordered containers?

Scheduled Pinned Locked Moved General and Desktop
2 Posts 2 Posters 2.1k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • C Offline
    C Offline
    Cayan
    wrote on last edited by
    #1

    I would like to know if Qt supports any unordered containers, since I could not find anything about it on the documentation I came here to confirm it.

    In case it doesn't have would the could below be a workaround for my class?
    @inline bool operator<(const MyClass& class1)
    {
    return false;
    }@

    Since c1 < c2 and c2 < c1, Qt will assume they are equal, according to the documentation.

    1 Reply Last reply
    0
    • M Offline
      M Offline
      MuldeR
      wrote on last edited by
      #2

      I'm not exactly sure what you mean, but QSet and QHash are "unordered" containers.

      (They don't retain a specific order of the elements. Instead they provide fast hash-based lookup)

      My OpenSource software at: http://muldersoft.com/

      Qt v4.8.6 MSVC 2013, static/shared: http://goo.gl/BXqhrS

      Go visit the coop: http://youtu.be/Jay...

      1 Reply Last reply
      0

      • Login

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved