赞
踩
一、Qt–MV结构之 QFileSystemModel
代码如下:
QSplitter * pSp = new QSplitter(this);
QFileSystemModel * pModel = new QFileSystemModel(this);
pModel->setRootPath(QDir::currentPath());
QTreeView * pTreeView = new QTreeView(pSp);
pTreeView->setModel(pModel);
pTreeView->setRootIndex(pModel->index(QDir::currentPath()));
QListView * pListView = new QListView(pSp);
pListView->setModel(pModel);
pListView->setRootIndex(pModel->index(QDir::currentPath()));
pSp->show();
效果图:
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。