If you want to iterate over every item, to any level of depth use an iterator. To iterate over the entire tree, initialize the iterator with the list view itself; to iterate over an item's children (and children's children to any depth), initialize the iterator with the item:
QListViewItemIterator it( listview );
while ( it.current() ) {
QListViewItem *item = it.current();
doSomething( item );
++it;
}
Чтение документации творит чудеса