所有文件的 mime 类型是什么

What is the mime-type for All Files

简单问题:"All Files" 的 mimetype 是什么,即 **.*

我需要它来将选项 "All Files" 添加到 QFileDialog:

中文件的过滤器
QFileDialog dialog(this);
QStringList mTypes= byteToStringList(QImageReader::supportedMimeTypes());
mTypes.append("???");//what to add here to get "All Files (*)" or "All Files (*.*)"
dialog.setMimeTypeFilters(mTypes);

根本不要设置任何 mime 类型过滤器,然后它将显示所有文件。

字面意思是 the documentation for the function

Use "application/octet-stream" for the "All files (*)" filter, since that is the base MIME type for all files.

你可以使用这个:

QFileDialog dialog(this);
dialog.setFileMode(QFileDialog::AnyFile);