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

image - ClassNotFoundException when add a prebuilt apk into system.img in android -

I need to import mysql 5.1 to 5.5? -

Java, Hibernate, MySQL - store UTC date-time -