
Originally Posted by
wysota
What do you mean by "two lists of different objects"? Do you wish to get one list as a result or two separate lists, one for each source list?
It is two different lists.(To be compared by specific value i.e. CREATION_TIME)
e.g. QList<Student> & QList<Employee>.
PS : And I think the result will be stored in the other list after comparison.
for e.g.:
QList<QObject> listNew;
QList<Employee> listEmp;
QList<Student> listStud;
for(i=0;;i++)
if(listEmp.at(i).creTime<listStud.at(i).creTime)
listNew.add(listEmp.at(i));
else
listNew.add(listStud.at(i));
QList<QObject> listNew;
QList<Employee> listEmp;
QList<Student> listStud;
for(i=0;;i++)
if(listEmp.at(i).creTime<listStud.at(i).creTime)
listNew.add(listEmp.at(i));
else
listNew.add(listStud.at(i));
To copy to clipboard, switch view to plain text mode
Pls ignore the mistakes as I am new to this technology & know very less about this.
Thanks.
Bookmarks