QDirModel

来源:互联网 发布:大数据用什么语言最好 编辑:程序博客网 时间:2024/05/16 05:50

QDirModel

**
The QDirModel class provides a data model for the local filesystem.
The usage of QDirModel is not recommended anymore. The QFileSystemModel class is a more performant alternative.
This class provides access to the local filesystem, providing functions for renaming and removing files and directories, and for creating new directories. In the simplest case, it can be used with a suitable display widget as part of a browser or filer.
QDirModel keeps a cache with file information. The cache needs to be updated with refresh().
QDirModel can be accessed using the standard interface provided by QAbstractItemModel, but it also provides some convenience functions that are specific to a directory model. The fileInfo() and isDir() functions provide information about the underlying files and directories related to items in the model.
Directories can be created and removed using mkdir(), rmdir(), and the model will be automatically updated to take the changes into account.


This class is obsolete
官方文档不推荐使用这个类,转而使用QFileSystemModel

原创粉丝点击