00001 #include "exercisetreeview.h" 00002 #include <QDebug> 00003 00004 ExerciseTreeView::ExerciseTreeView(QWidget *parent) : QTreeView(parent) 00005 { 00006 } 00007 00008 void ExerciseTreeView::resetView() 00009 { 00010 QModelIndex current = currentIndex(); 00011 //qDebug()<<"current: " << current; 00012 00013 //QTreeView::reset(); 00014 00015 // reopens all entries in the tree, selects entry selected before the reset 00016 expandAll(); 00017 setCurrentIndex(current); 00018 }