内容表

上一话题

共享内存范例

下一话题

JSON 保存游戏范例

MIME 类型浏览器范例

Shows the hierarchy of MIME types and can be used to determine the MIME type of a file.

../_images/mimetypebrowser.png

MIME Type Browser is intended to be a tool for exploring MIME types rather than an example showing the typical usage of Qt’s MIME API.

运行范例

要运行范例从 Qt Creator ,打开 欢迎 模式,然后选择范例从 范例 . For more information, visit Building and Running an Example.

主窗口

The main window consists of a tree view displaying the hierarchy of MIME types based on the model MimetypeModel inheriting QStandardItemModel on the left and a QTextBrowser for showing detailed information about the selected MIME type on the right.

It has a main menu with an option File/Detect File Type, which lets you pick a file and then displays its MIME type.

解更多信息,见 QMimeType and QMimeDatabase .

范例工程 @ code.qt.io