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:
for(int i = 0; i< tree->model()->rowCount(); i++){ doSomething(index); }To copy to clipboard, switch view to plain text mode





Reply With Quote
Bookmarks