You can:

1) If your key is a structure you have created you can create the comparison function like this:

Qt Code:
  1. bool operator<(const YourType& k0, const YourType& k1)
  2. {
  3. //do stuff...
  4. //return true if k0 is LESS than k1, if k0 is equal or more than k1 return false
  5. }
To copy to clipboard, switch view to plain text mode 

2) Pass a compare function when you create the map. Read this it will explained it very well.