FileIconProvider Namespace
Core::FileIconProviderProvides functions for registering custom overlay icons for system icons. More...
Header: | #include <FileIconProvider> |
Functions
class Q_DECL_IMPORT | registerIconOverlayForMimeType(const class QIcon &icon, const QString &mimeType) |
class Q_DECL_IMPORT | registerIconOverlayForMimeType(const QString &path, const QString &mimeType) |
class Q_DECL_IMPORT | registerIconOverlayForSuffix(const QString &path, const QString &suffix) |
Detailed Description
Provides icons based on file suffixes with the ability to overwrite system icons for specific subtypes. The underlying QFileIconProvider can be used for QFileSystemModel.
Note: Registering overlay icons currently completely replaces the system icon and is therefore not recommended on platforms that have their own overlay icon handling (macOS and Windows).
Plugins can register custom overlay icons via registerIconOverlayForSuffix(), and retrieve icons via the icon() function.
Function Documentation
class Q_DECL_IMPORT FileIconProvider::registerIconOverlayForMimeType(const class QIcon &icon, const QString &mimeType)
Registers icon for all the suffixes of a the mime type mimeType, overlaying the system file icon.
class Q_DECL_IMPORT FileIconProvider::registerIconOverlayForMimeType(const QString &path, const QString &mimeType)
This is an overloaded function.
class Q_DECL_IMPORT FileIconProvider::registerIconOverlayForSuffix(const QString &path, const QString &suffix)
Registers an icon at path for a given suffix, overlaying the system file icon.