Hi all,
I’ve tried to use these two types of iterators and both are working.
but, what is the difference? or which is better to use?
thanks in advance
boris
QList<T*> myList;
QList<T*>::iterator it1= myList.begin();
for( ; it1 != myList.end(); ++it1)
(*it1)->doSomething();
QListIterator<T*> it2(myList);
while(it2.hasNext())
it2.next()->doSomething();
↧