QTreeView类中成员函数setRootIndex(), void QTreeView::setRootIndex ( const QModelIndex & index ) [virtual]

功能为:Sets the root item to the item at the given index.

若不使用该函数,显示出硬盘目录,使用之后,显示出当前文件目录。为什么呢??

Qt模型视图-QFileSystemModel-QTreeViewQt模型视图-QFileSystemModel-QTreeView

相关文章: