User Interface Compiler (uic)

This page documents the User Interface Compiler for the Qt Widgets module. The uic reads an XML format user interface definition (.ui) file as generated by Qt Designer and creates a corresponding C++ header file or Python source file.

Usage:

uic [options] <uifile>

Options

The following table lists the command-line options recognized by uic.

OptionDescription
-h, --helpDisplays help on commandline options.
-help-allDisplays help including Qt specific options.
-v, --versionDisplays version information.
-d, --dependenciesDisplay the dependencies.
-o, --output <file>Place the output into <file>
-a, --no-autoconnectionDo not generate a call to QObject::connectSlotsByName().
-p, --no-protectionDisable header protection.
-n, --no-implicit-includesDisable generation of #include-directives.
--postfix <postfix>Postfix to add to all generated classnames.
--tr, --translate <function>Use <function> for i18n.
--include <include-file>Add #include <include-file> to <file>.
-g, --generator <python|cpp>Select generator.
-c, --connections <pmf|string>Connection syntax.
--idbasedUse id based function for i18n
--from-importsPython: generate imports relative to '.'
--absolute-importsPython: generate absolute imports
--rc-prefixPython: Generate "rc_file" instead of "file_rc" import
--star-importsPython: Use * imports
--python-paths <pathlist>Python paths for –absolute-imports.

Usage

See Using a Designer UI File in Your C++ Application or Using a Designer UI File in Your Qt for Python Application.

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