Ok here are the two lists I have to begin with:

Qt Code:
  1. QStringList refList; // {'x','y','z','t','u','x','t'}
  2. QStringList priceList; // {'pricex','pricey','pricez','pricet','priceu','pricex','pricet'}
To copy to clipboard, switch view to plain text mode 

Those are the three list I want to get ( I added the quantity list) :

Qt Code:
  1. QStringList refListWithOutDuplicates; //{'x','y','z','t','u'}
  2. QStringList priceList; // {'pricex','pricey','pricez','pricet','priceu'}
  3. QStringList qtyOfEachRef; // {'qty_of_x','qty_of_y','qty_of_z','qty_of_t','qty_of_u'}
To copy to clipboard, switch view to plain text mode 

update: by quantity I mean number of iteration of each ref.

Thanx in advance
Pat