Dir View Example is not working correctly
-
Problem is, that there is no icons, as in example. I tried even writing own icon provider, and seems that it don't work correctly anyway. Qt version is 6.0.4
How it looks from example:

And mine:

#include <QApplication> #include <QFileSystemModel> #include <QFileIconProvider> #include <QTreeView> #include <QCommandLineParser> #include <QCommandLineOption> int main(int argc, char *argv[]) { QApplication app(argc, argv); QFileSystemModel model; QFileIconProvider iconProvider; model.setIconProvider(&iconProvider); model.setRootPath(""); QTreeView tree; tree.setModel(&model); tree.resize(800,500); tree.setWindowTitle(QObject::tr("Dir View")); tree.show(); return app.exec(); } -
Hi
The same code shows icons in 5.12.2 so seems to be a Qt6 thing.
I tried to search https://bugreports.qt.io/ but didnt see a report.