Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    Find Closest key to specific key in QMap

    General and Desktop
    1
    2
    880
    Loading More Posts
    • 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.
    • A
      alizadeh91 last edited by

      Hi there,
      Suppose there is QMap<int,int> _list; and it has filled with keys: 2,4,7,8,10,.... (suppose).
      What i have to do for finding closest key to 6 ? (here will be 7).

      1 Reply Last reply Reply Quote 0
      • A
        alizadeh91 last edited by

        I've found it by myself :)
        QMap::upperBound

        1 Reply Last reply Reply Quote 0
        • First post
          Last post