I have a list which contains references and another contains prices of each reference. There are some duplicates. It looks like this:

Qt Code:
  1. QStringList refList;
  2. QStringList priceList;
  3.  
  4. {code to fill each list}
To copy to clipboard, switch view to plain text mode 

I want to get the quantity of each reference and get the price of the sum of each duplicate so to get the result into two QStringList:

Qt Code:
  1. QStringList refListWithOutDuplicates;
  2. QStringList priceList;
To copy to clipboard, switch view to plain text mode 

Any idea what's the best way to do this with Qt?


Thanx in advance

Pat