Greetz BlaXpydo
Your class AccountList is derived from QList<T*>
this means it contains pointers of type T.
In this case it T is Account a class.
Because AccountList is derived from QList it just needs a loop to iterate through each item.
I used
Language: C++
foreach (Account *acc, *this)
{
//statments
}
You could use any of the Mutliating iterator loops given in chapter 4 like
Language: C++ (QT)
for (QStringList::iterator it = list.begin(); it != list.end(); ++it)
{
QString current = *it;
qDebug() << "[[" << current << "]]";
}
//while loop with iterator
QListIterator<QString> itr (list2);
while (itr.hasNext())
{
QString current = itr.next();
qDebug() << "{" << current << "}";
}
I hope this helps.