QFileIconProvider

The QFileIconProvider class provides file icons for the QDirModel and the QFileSystemModel classes. More

Inheritance diagram of PySide2.QtWidgets.QFileIconProvider

Synopsis

Functions

Virtual functions

Detailed Description

class PySide2.QtWidgets.QFileIconProvider

Constructs a file icon provider.

PySide2.QtWidgets.QFileIconProvider.IconType

Constant

Description

QFileIconProvider.Computer

QFileIconProvider.Desktop

QFileIconProvider.Trashcan

QFileIconProvider.Network

QFileIconProvider.Drive

QFileIconProvider.Folder

QFileIconProvider.File

PySide2.QtWidgets.QFileIconProvider.Option

Constant

Description

QFileIconProvider.DontUseCustomDirectoryIcons

Always use the default directory icon. Some platforms allow the user to set a different icon. Custom icon lookup cause a big performance impact over network or removable drives.

PySide2.QtWidgets.QFileIconProvider.icon(type)
Parameters:

typeIconType

Return type:

PySide2.QtGui.QIcon

Returns an icon set for the given type .

PySide2.QtWidgets.QFileIconProvider.icon(info)
Parameters:

infoPySide2.QtCore.QFileInfo

Return type:

PySide2.QtGui.QIcon

PySide2.QtWidgets.QFileIconProvider.options()
Return type:

Options

Returns all the options that affect the icon provider. By default, all options are disabled.

See also

setOptions()

PySide2.QtWidgets.QFileIconProvider.setOptions(options)
Parameters:

optionsOptions

Sets options that affect the icon provider.

See also

options()

PySide2.QtWidgets.QFileIconProvider.type(info)
Parameters:

infoPySide2.QtCore.QFileInfo

Return type:

str

Returns the type of the file described by info .