What is the best way to define and use a QIterator on a QTreeView model? I want to iterate through all the items in a QTreeView's model, and I'm having some trouble figuring out the best way to turn a custom model based on QAbstractItemModel into a QListView in order to create the iterator. I'm using an example based more/less on SimpleTreeView in the QT Examples. Thanks in advance for your help.