PDA

View Full Version : Comparison of each element in two different QStringList !!



Choti
3rd February 2016, 14:16
Hello Everyone,

I have two stringlist a and b.... Now I want compare the elements of a with elements of b and it should give the different value from b. how can I get the different value only from b stringlist.


Thank you

anda_skoa
3rd February 2016, 14:21
Let me try to rephrase that: you want to get a list that has all elements of b which are not also in a?
Does the order of elements in the result list need to be the same as in b?

Cheers,
_

Caolan O'Domhnaill
3rd February 2016, 21:47
This should help out...

http://doc.qt.io/qt-5/qset.html#subtract

Choti
5th February 2016, 13:13
I got the answer :) Thank you all :)