NAME
uic - Qt user interface compiler
SYNOPSIS
uic [options] file
DESCRIPTION
This page documents the User Interface Compiler for the Qt GUI application framework. The uic reads a user interface definition file in XML as generated by the Qt Designer and creates corresponding C++ header or source files.
Generate declaration:
uic [options] <file>
Generate implementation:
uic [options] -impl <headerfile> <file>
<headerfile>: name of the declaration file
For convenience, uic can also generate declaration or implementation stubs for subclasses.
Generate subclass declaration:
uic [options] -subdecl <classname> <headerfile> <file>
<classname>: name of the subclass to generate
<headerfile>: declaration file of the baseclass
Generate subclass implementation:
uic [options] -subimpl <classname> <headerfile> <file>
<classname>: name of the subclass to generate
<headerfile>: declaration file of the subclass
GENERAL OPTIONS
- -o file
-
Write output to file rather than to stdout.
- -tr func
-
Use func(...) rather than tr(...) for i18n.
USAGE
uic is almost always invoked by make(1), not by hand.
Here are useful makefile rules if you only use GNU make:
%.h: %.ui
uic $< -o $@
%.cpp: %.ui
uic -impl $*.h $< -o $@
If you want to write portably, you can use individual rules of the following form:
NAME.h: NAME.ui
uic $< -o $@
NAME.cpp: NAME.ui
uic -impl $*.h $< -o $@
You must also remember to add NAME.cpp to your SOURCES (substitute your favorite name) variable and NAME.o to your OBJECTS variable.
(While we prefer to name our C++ source files .cpp, the uic doesn't know that, so you can use .C, .cc, .CC, .cxx or even .c++ if you prefer.)
SEE ALSO
http://www.trolltech.com/
AUTHOR
Trolltech AS <[email protected]>