c++ - 所有文件的 mime 类型是什么

标签 c++ qt mime-types

简单问题:“所有文件”的 mime 类型是什么,即 **.*

我需要它来将选项“所有文件”添加到 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);

最佳答案

字面意思是 the documentation for the function

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

关于c++ - 所有文件的 mime 类型是什么,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34930793/

相关文章:

windows - Qt + 声子 : doesn't play on some computers

html - 嵌入字体的 SVG 图像的正确 mime 类型

c++ - Windows 中的 Qt qrand in 循环生成相同的数字

c++ - Visual Studio : C++ newline constant error

Android 应用程序已分配给任何可能的文件 - 应仅分配给我的自定义文件

http - 为什么 'x-www-form-urlencoded' 以 'x-www' 开头,而其他标准内容类型不是?

c++ - 如何将数组的引用作为函数参数传递,该数组的大小仅在运行时已知?

c++ - 找到可以数到 N 的最小整数类型

C++ 静态数组初始化 : does inline initialization reserve space?

c++ - 缩放 Dijkstra 算法的实现