You don't turn a model into the view. The view's data is held in the model so if you want to iterate the items of the view, you just access the model.

Qt Code:
  1. for(int i = 0; i< tree->model()->rowCount(); i++){
  2. QModelIndex index = tree->index(i, 0); // column no 0
  3. doSomething(index);
  4. }
To copy to clipboard, switch view to plain text mode