PDA

View Full Version : how to get common element from a group of QStringList?



aurora
9th January 2012, 06:27
Hi all,
I have problem, in my program i'm using a hash variable
QHash<QString,QStringList> HFileSignal;
It is a hash of file name and signal name list inside the file.
Now i want to find common signals from al those file.

So kindly tell me
1. Is there any buit in function in Qt to achieve this?
2.How can i declare a variable name on fly(while running program, inside a loop i must able to declare the variable)?

Lykurg
9th January 2012, 07:54
1. No.
2. Make a simple function which loops through the elements. If it is a huge hash you could consider a better algorithm.