User Interface Compiler (uic)
Questa pagina descrive il User Interface Compiler per il Qt Widgets modulo. Il uic e legge un file di definizione dell'interfaccia utente in formato XML (.ui) generato da Qt Widgets Designer e crea un file di intestazione C++ o un file sorgente Python corrispondente.
Utilizzo:
uic [options] <uifile>Opzioni
La tabella seguente elenca le opzioni della riga di comando riconosciute da uic.
| Opzione | Descrizione |
|---|---|
-h, --help | Visualizza la guida sulle opzioni della riga di comando. |
-help-all | Visualizza la guida, comprese le opzioni specifiche di Qt. |
-v, --version | Visualizza le informazioni sulla versione. |
-d, --dependencies | Visualizza le dipendenze. |
-o, --output <file> | Inserisce l'output nel file <file> |
-a, --no-autoconnection | Non genera una chiamata a QObject::connectSlotsByName(). |
-p, --no-protection | Disabilita la protezione dell'intestazione. |
-n, --no-implicit-includes | Disabilita la generazione delle direttive #include. |
--postfix <postfix> | Suffisso da aggiungere a tutti i nomi di classe generati. |
--tr, --translate <function> | Utilizza <funzione> per l'i18n. |
--include <include-file> | Aggiungere #include <file-di-inclusione> a <file>. |
-g, --generator <python|cpp> | Seleziona il generatore. |
-c, --connections <pmf|string> | Sintassi di connessione. |
--idbased | Utilizzare una funzione basata sull'ID per l'i18n |
--from-imports | Python: generare importazioni relative a '.' |
--absolute-imports | Python: generare importazioni assolute |
--rc-prefix | Python: generare l'import "rc_file" anziché "file_rc" |
--star-imports | Python: utilizzare importazioni * |
--python-paths <pathlist> | Percorsi Python per --absolute-imports. |
Utilizzo
Vedere Utilizzo di un file UI di Qt Widgets Designer nell’applicazione C++ o Utilizzo di un file UI di Qt Widgets Designer nell’applicazione Qt for Python .
© 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.