c++ - Reducing QListView to the common elements in the list? -


is there methode or simple approach this?

given list with:

d b b c d d 

i want list reduced to:

a b c d 

otherwise write process in background.

it depends on how data storen , passed view. generally, simpliest way remove duplicates list of element converting set:

qstringlist values; //... qset<qstring> set = values.toset(); 

after can convert set list using tolist or iterate on set using usual foreach loop. note qset unordered. if want sort strings, convert set list , sort list using qsort.


Comments

Popular posts from this blog

plot - Remove Objects from Legend When You Have Also Used Fit, Matlab -

java - Why does my date parsing return a weird date? -

Need help in packaging app using TideSDK on Windows -