PySide6.QtWidgets.QFileSystemModel

class QFileSystemModel

PySide6.QtWidgets.QFileSystemModel 的继承图

概要

属性

方法

信号

注意

本文档可能包含从C++自动翻译到Python的代码片段。我们始终欢迎对代码片段翻译的贡献。如果您发现翻译问题,您也可以通过在我们的https:/bugreports.qt.io/projects/PYSIDE上创建工单来告知我们。

详细描述

class Roles
class Option

注意

当使用from __feature__ import true_property时,属性可以直接使用,否则通过访问器函数使用。

property nameFilterDisablesᅟ: bool
Access functions:
property optionsᅟ: Combination of QAbstractFileIconProvider.Option
Access functions:
property readOnlyᅟ: bool
Access functions:
Access functions:
__init__([parent=None])
Parameters:

父对象QObject

directoryLoaded(path)
Parameters:

路径 – 字符串

fileIcon(index)
Parameters:

索引QModelIndex

Return type:

QIcon

fileInfo(index)
Parameters:

索引QModelIndex

Return type:

QFileInfo

fileName(index)
Parameters:

索引QModelIndex

Return type:

字符串

filePath(index)
Parameters:

索引QModelIndex

Return type:

字符串

fileRenamed(path, oldName, newName)
Parameters:
  • path – 字符串

  • oldName – str

  • newName – 字符串

filter()
Return type:

Filter的组合

iconProvider()
Return type:

QAbstractFileIconProvider

index(path[, column=0])
Parameters:
  • path – 字符串

  • column – 整数

Return type:

QModelIndex

isDir(index)
Parameters:

索引QModelIndex

Return type:

布尔

isReadOnly()
Return type:

布尔

属性 readOnlyᅟ 的获取器。

lastModified(index)
Parameters:

索引QModelIndex

Return type:

QDateTime

lastModified(index, tz)
Parameters:
Return type:

QDateTime

mkdir(parent, name)
Parameters:
Return type:

QModelIndex

myComputer([role=Qt.DisplayRole])
Parameters:

角色 – int

Return type:

对象

nameFilterDisables()
Return type:

布尔

属性 nameFilterDisablesᅟ 的获取器。

nameFilters()
Return type:

字符串列表

options()
Return type:

Option的组合

permissions(index)
Parameters:

索引QModelIndex

Return type:

Permission的组合

remove(index)
Parameters:

索引QModelIndex

Return type:

布尔

resolveSymlinks()
Return type:

布尔

属性 resolveSymlinksᅟ 的获取器。

rmdir(index)
Parameters:

索引QModelIndex

Return type:

布尔

rootDirectory()
Return type:

QDir

rootPath()
Return type:

字符串

rootPathChanged(newPath)
Parameters:

newPath – str

setFilter(filters)
Parameters:

filtersFilter 的组合

setIconProvider(provider)
Parameters:

providerQAbstractFileIconProvider

setNameFilterDisables(enable)
Parameters:

enable – 布尔值

属性 nameFilterDisablesᅟ 的设置器。

setNameFilters(filters)
Parameters:

filters – 字符串列表

setOption(option[, on=true])
Parameters:
  • optionOption

  • on – 布尔值

setOptions(options)
Parameters:

optionsOption 的组合

setReadOnly(enable)
Parameters:

enable – 布尔值

属性 readOnlyᅟ 的设置器。

Parameters:

enable – 布尔值

属性 resolveSymlinksᅟ 的设置器。

setRootPath(path)
Parameters:

路径 – 字符串

Return type:

QModelIndex

size(index)
Parameters:

索引QModelIndex

Return type:

整数

testOption(option)
Parameters:

选项Option

Return type:

布尔

type(index)
Parameters:

索引QModelIndex

Return type:

字符串