class QAbstractFileIconProvider

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

Inherited by: QFileIconProvider

Synopsis

Methods

Virtual methods

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 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

class 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.

__init__()

Constructs a file icon provider.

icon(arg__1)
Parameters:

arg__1IconType

Return type:

QIcon

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

See also

fromTheme

icon(arg__1)
Parameters:

arg__1QFileInfo

Return type:

QIcon

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

See also

fromTheme

options()
Return type:

Combination of Option

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

See also

setOptions()

setOptions(arg__1)
Parameters:

arg__1 – Combination of Option

Sets options that affect the icon provider.

See also

options()

type(arg__1)
Parameters:

arg__1QFileInfo

Return type:

str

Returns the type of the file described by info.