CTreeViewGetThumbImage::CTreeViewGetThumbImage( QWidget*parent) : QTreeView(parent)
{
QString strExeDir = QApplication::applicationDirPath();[pre] QString strTexture = strExeDir + "/resource/";[/pre][pre] model = new QFileSystemModel ;[/pre][pre] model->setReadOnly(true);[/pre][pre] model->setFilter(QDir::Dirs |QDir::NoDotAndDotDot);[/pre][pre] this->setModel(model);[/pre][pre] this->setRootIndex(model->setRootPath(strTexture));[/pre]}
我继承了QTreeview,初始化时候设定了这些,但是显示出来只能是
[pre]setRootPath目录,我想让我的电脑下的目录内容与setRootPath同级显示应该怎么处理?[/pre]