#include "modelwidget.h" ModelWidget::ModelWidget(QWidget *parent) : QWidget(parent) { int width=qApp->desktop()->geometry().width(); int height=qApp->desktop()->geometry().height(); this->setGeometry(0,0,width,height); rootDiretory="/"; layout = new QVBoxLayout(this); model = new QFileSystemModel(this); model->setFilter(QDir::AllEntries | QDir::NoDotAndDotDot); lv = new QListView; layout->addWidget(lv); lv->setModel(model); lv->setRootIndex(model->setRootPath(rootDiretory)); lv->setFocus(); QFont font=this->font(); font.setPixelSize(30); lv->setFont(font); connect(lv,SIGNAL(activated (const QModelIndex &)),this,SLOT(ItemClicked(const QModelIndex &))); connect(model,SIGNAL(directoryLoaded(const QString)),this,SLOT(Initlistview(QString))); qDebug()<&l