このページでは

MIMEタイプブラウザ

MIMEタイプの階層構造を表示し、ファイルのMIMEタイプを特定するために使用できます。

MIMEタイプブラウザの例のスクリーンショット

MIMEタイプブラウザは、QtのMIME APIの典型的な使用例を示すものではなく、MIMEタイプを探索するためのツールとして設計されています。

例の動作

サンプルは次の手順で実行できます。

メインウィンドウ

メインウィンドウは、左側に `QStandardItemModel ` を継承する `MimetypeModel` モデルに基づく MIME タイプの階層を表示するツリービューと、右側に選択した MIME タイプの詳細情報を表示する `QTextBrowser ` で構成されています。

メインメニューには「File/Detect File Type 」というオプションがあり、これを使用するとファイルを選択して、その MIME タイプを表示することができます。

詳細については、QMimeType およびQMimeDatabase を参照してください。

サンプルプロジェクト @ code.qt.io

© 2026 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.