#include #include #include int main(int argc, char *argv[]) { // initial directory static const QString dir{ QStringLiteral("C:/") }; QApplication app(argc,argv); // non-native file dialog at root of system drive QFileDialog filedialog(nullptr,"test",dir); filedialog.setOption(QFileDialog::DontUseNativeDialog); filedialog.setViewMode(QFileDialog::Detail); // note that the "Users" directory does not have an icon (unlike the other ones). // also within the "Users" directory, the directory for the current user also // does not have an icon. // besides these directories, there are more directories missing their icon // (also on other drives). it seems to only affect directories, not drives/files. filedialog.show(); return QApplication::exec(); }