I have the path to a file/folder. How can I get the icon image in the system for this file/folder? I'm writing a customized file browse model for a QTreeView
and would like to display the icon like what the QFileSystemModel
does.
Asked
Active
Viewed 800 times
1

user110
- 315
- 1
- 11
1 Answers
2
AFAIK QFileSystemModel relies on QFileIconProvider
to get the correct icon.
You can do the same in your implementation by using the icon (const QFileInfo &info)
method.
This may work or not depending on the Desktop Environment you use.

Jeannot
- 1,165
- 7
- 18