このページについて

User Interface Compiler (uic)

このページでは、 User Interface Compiler について Qt Widgets モジュールに関するドキュメントです。uic は、によって生成されたXML形式のユーザーインターフェース定義ファイル(.ui )を読み込み、 Qt Widgets Designer によって生成されたXML形式のユーザーインターフェース定義(xml-ph-0001@deepl.internal)ファイルを読み込み、対応するC++ヘッダーファイルまたはPythonソースファイルを生成します。

使用方法:

uic [options] <uifile>

オプション

以下の表は、uic が認識するコマンドラインオプションの一覧です。

オプション説明
-h, --helpコマンドラインオプションに関するヘルプを表示します。
-help-allQt 固有のオプションを含むヘルプを表示します。
-v, --versionバージョン情報を表示します。
-d, --dependencies依存関係を表示します。
-o, --output <file>出力を <file> に書き込みます。
-a, --no-autoconnectionQObject::connectSlotsByName() の呼び出しを生成しない。
-p, --no-protectionヘッダー保護を無効にします。
-n, --no-implicit-includes#include ディレクティブの生成を無効にします。
--postfix <postfix>生成されたすべてのクラス名に追加する接尾辞。
--tr, --translate <function>i18n には <function> を使用します。
--include <include-file><file> に #include <include-file> を追加します。
-g, --generator <python|cpp>ジェネレータを選択します。
-c, --connections <pmf|string>接続構文。
--idbasedi18n には ID ベースの関数を使用する
--from-importsPython: 「.」を基準とした相対インポートを生成
--absolute-importsPython: 絶対パスのインポートを生成
--rc-prefixPython: 「file_rc」のインポートの代わりに「rc_file」を生成する
--star-importsPython: * インポートを使用する
--python-paths <pathlist>--absolute-imports 用のPythonパス。

使用方法

「C++ アプリケーションでのQt Widgets Designer UI ファイルの使用」または「 Qt for Python アプリケーションでのQt Widgets Designer UI ファイルの使用」を参照してください。

© 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.