Auf dieser Seite

QAbstractFileIconProvider Class

Die Klasse „QAbstractFileIconProvider“ stellt Dateisymbole für die Klasse „ QFileSystemModel “ bereit. Mehr...

Header: #include <QAbstractFileIconProvider>
CMake: find_package(Qt6 REQUIRED COMPONENTS Gui)
target_link_libraries(mytarget PRIVATE Qt6::Gui)
qmake: QT += gui
Seit: Qt 6.0
Vererbt an:

QFileIconProvider

Öffentliche Typen

enum IconType { Computer, Desktop, Trashcan, Network, Drive, …, File }
enum Option { DontUseCustomDirectoryIcons }
flags Options

Öffentliche Funktionen

QAbstractFileIconProvider()
virtual ~QAbstractFileIconProvider()
virtual QIcon icon(QAbstractFileIconProvider::IconType type) const
virtual QIcon icon(const QFileInfo &info) const
virtual QAbstractFileIconProvider::Options options() const
virtual void setOptions(QAbstractFileIconProvider::Options options)
virtual QString type(const QFileInfo &info) const

Ausführliche Beschreibung

Dokumentation zum Mitgliedstyp

enum QAbstractFileIconProvider::IconType

KonstanteWertBeschreibung
QAbstractFileIconProvider::Computer0Das Symbol, das für das gesamte Computergerät verwendet wird
QAbstractFileIconProvider::Desktop1Das Symbol für das spezielle Verzeichnis „Desktop“ des Benutzers
QAbstractFileIconProvider::Trashcan2Das Symbol für den „Papierkorb“ des Benutzers im Dateimanager des Desktops
QAbstractFileIconProvider::Network3Das Symbol für den Bereich „Netzwerkserver“ im Dateimanager des Desktops sowie für Arbeitsgruppen innerhalb des Netzwerks
QAbstractFileIconProvider::Drive4Das Symbol für Festplattenlaufwerke
QAbstractFileIconProvider::Folder5Das Standard-Ordnersymbol, das zur Darstellung von Verzeichnissen auf lokalen Dateisystemen verwendet wird
QAbstractFileIconProvider::File6Das Symbol für allgemeine Textdateitypen

enum QAbstractFileIconProvider::Option
flags QAbstractFileIconProvider::Options

KonstanteWertBeschreibung
QAbstractFileIconProvider::DontUseCustomDirectoryIcons0x00000001Verwenden Sie immer das Standard-Verzeichnissymbol. Auf einigen Plattformen kann der Benutzer ein anderes Symbol festlegen. Das Suchen nach benutzerdefinierten Symbolen führt bei Netzwerk- oder Wechseldatenträgern zu erheblichen Leistungseinbußen.

Der Typ „Options“ ist ein typedef für QFlags<Option>. Er speichert eine ODER-Kombination von Optionswerten.

Dokumentation der Mitgliedsfunktionen

QAbstractFileIconProvider::QAbstractFileIconProvider()

Erstellt einen Datei-Symbol-Anbieter.

[virtual noexcept] QAbstractFileIconProvider::~QAbstractFileIconProvider()

Löst den Dateisymbol-Provider auf.

[virtual] QIcon QAbstractFileIconProvider::icon(QAbstractFileIconProvider::IconType type) const

Gibt ein Icon-Set für die angegebene ` type` unter Verwendung des aktuellen Icon-Themes zurück.

Siehe auch QIcon::fromTheme.

[virtual] QIcon QAbstractFileIconProvider::icon(const QFileInfo &info) const

Gibt ein Symbol für die unter info beschriebene Datei zurück, wobei das aktuelle Symbolthema verwendet wird.

Siehe auch QIcon::fromTheme.

[virtual] QAbstractFileIconProvider::Options QAbstractFileIconProvider::options() const

Gibt alle Optionen zurück, die den Icon-Anbieter betreffen. Standardmäßig sind alle Optionen deaktiviert.

Siehe auch „ setOptions()“.

[virtual] void QAbstractFileIconProvider::setOptions(QAbstractFileIconProvider::Options options)

Legt „ options “ fest, die sich auf den Icon-Anbieter auswirken.

Siehe auch options().

[virtual] QString QAbstractFileIconProvider::type(const QFileInfo &info) const

Gibt den Typ der Datei zurück, die durch ` info` beschrieben wird.

© 2026 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.