It depends on what you are trying to accomplish. Factors such as duplication and order come into play if you are dealing with lists. If you just want to know which items have two lists, you can do this:
QSet<QString> intersection = list1.toSet().intersect(list2.toSet());
source share