IdentifiantMot de passe
Loading...
Mot de passe oublié ?Je m'inscris ! (gratuit)

User Interface Compiler (uic)

Qt Reference Documentation.

Article lu   fois.

L'auteur

Liens sociaux

Viadeo Twitter Facebook Share on Google+   

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.

Usage:

 
Sélectionnez
uic [options] <uifile>

Options

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

Option

Description

-h, --help

Displays help on commandline options.

-v, --version

Displays version information.

-d, --dependencies

Display the dependencies.

-o, --output <file>

Place the output into <file>

-a, --no-autoconnection

Do not generate a call to QObject::connectSlotsByName().

-p, --no-protection

Disable header protection.

-n, --no-implicit-includes

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

--idbased

Use id based function for i18n

--from-imports

Python: generate imports relative to '.'

Examples

If you use qmake, uic will be invoked automatically for header files.

Here are useful makefile rules if you only use GNU make:

 
Sélectionnez
ui_%.h: %.ui
        uic $&lt; -o $@

If you want to write portably, you can use individual rules of the following form:

 
Sélectionnez
ui_foo.h: foo.ui
        uic $&lt; -o $@

You must also remember to add ui_foo.h to your HEADERS (substitute your favorite name).

Vous avez aimé ce tutoriel ? Alors partagez-le en cliquant sur les boutons suivants : Viadeo Twitter Facebook Share on Google+