QAbstractFileIconProvider#

The QAbstractFileIconProvider class provides file icons for the QFileSystemModel class. More

Inheritance diagram of PySide6.QtGui.QAbstractFileIconProvider

Inherited by: QFileIconProvider

Synopsis#

Virtual functions#

Note

This documentation may contain snippets that were automatically translated from C++ to Python. We always welcome contributions to the snippet translation. If you see an issue with the translation, you can also let us know by creating a ticket on https:/bugreports.qt.io/projects/PYSIDE

Detailed Description#

class PySide6.QtGui.QAbstractFileIconProvider#

Constructs a file icon provider.

PySide6.QtGui.QAbstractFileIconProvider.IconType#

Constant

Description

QAbstractFileIconProvider.Computer

The icon used for the computing device as a whole

QAbstractFileIconProvider.Desktop

The icon for the special “Desktop” directory of the user

QAbstractFileIconProvider.Trashcan

The icon for the user’s “Trash” place in the desktop’s file manager

QAbstractFileIconProvider.Network

The icon for the “Network Servers” place in the desktop’s file manager, and workgroups within the network

QAbstractFileIconProvider.Drive

The icon used for disk drives

QAbstractFileIconProvider.Folder

The standard folder icon used to represent directories on local filesystems

QAbstractFileIconProvider.File

The icon used for generic text file types

PySide6.QtGui.QAbstractFileIconProvider.Option#

Constant

Description

QAbstractFileIconProvider.DontUseCustomDirectoryIcons

(inherits enum.Flag) 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.

PySide6.QtGui.QAbstractFileIconProvider.icon(arg__1)#
Parameters:

arg__1IconType

Return type:

PySide6.QtGui.QIcon

Returns an icon set for the given type, using the current icon theme.

See also

fromTheme

PySide6.QtGui.QAbstractFileIconProvider.icon(arg__1)
Parameters:

arg__1PySide6.QtCore.QFileInfo

Return type:

PySide6.QtGui.QIcon

Returns an icon for the file described by info, using the current icon theme.

See also

fromTheme

PySide6.QtGui.QAbstractFileIconProvider.options()#
Return type:

Options

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

See also

setOptions()

PySide6.QtGui.QAbstractFileIconProvider.setOptions(arg__1)#
Parameters:

arg__1Options

Sets options that affect the icon provider.

See also

options()

PySide6.QtGui.QAbstractFileIconProvider.type(arg__1)#
Parameters:

arg__1PySide6.QtCore.QFileInfo

Return type:

str

Returns the type of the file described by info.