IdentifiantMot de passe
Loading...
Mot de passe oublié ?Je m'inscris ! (gratuit)

QAbstractFileIconProvider Class

The QAbstractFileIconProvider class provides file icons for the QFileSystemModel class.

This class was introduced in Qt 6.0.

Article lu   fois.

L'auteur

Liens sociaux

Viadeo Twitter Facebook Share on Google+   

QAbstractFileIconProvider Class▲

  • Header: QAbstractFileIconProvider

  • Since: Qt 6.0

  • CMake:

    find_package(Qt6 REQUIRED COMPONENTS Gui)

    target_link_libraries(mytarget PRIVATE Qt6::Gui)

  • qmake: QT += gui

Detailed Description▲

 

Member Type Documentation▲

 

enum QAbstractFileIconProvider::IconType▲

Constant

Value

Description

QAbstractFileIconProvider::Computer

0

The icon used for the computing device as a whole

QAbstractFileIconProvider::Desktop

1

The icon for the special "Desktop" directory of the user

QAbstractFileIconProvider::Trashcan

2

The icon for the user's "Trash" place in the desktop's file manager

QAbstractFileIconProvider::Network

3

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

QAbstractFileIconProvider::Drive

4

The icon used for disk drives

QAbstractFileIconProvider::Folder

5

The standard folder icon used to represent directories on local filesystems

QAbstractFileIconProvider::File

6

The icon used for generic text file types

enum QAbstractFileIconProvider::Option▲

flags QAbstractFileIconProvider::Options

Constant

Value

Description

QAbstractFileIconProvider::DontUseCustomDirectoryIcons

0x00000001

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.

The Options type is a typedef for QFlags<Option>. It stores an OR combination of Option values.

Member Function Documentation▲

 

QAbstractFileIconProvider::QAbstractFileIconProvider()▲

Constructs a file icon provider.

[virtual] QAbstractFileIconProvider::~QAbstractFileIconProvider()▲

Destroys the file icon provider.

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

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

See Also▲

See also QIcon::fromTheme

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

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

See Also▲

See also QIcon::fromTheme

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

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

See Also▲

See also setOptions()

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

Sets options that affect the icon provider.

See Also▲

See also options()

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

Returns the type of the file described by info.

Vous avez aimé ce tutoriel ? Alors partagez-le en cliquant sur les boutons suivants : Viadeo Twitter Facebook Share on Google+