What is the UI file format?
A .ui file is an XML-based form layout description created and edited by Qt Designer, the visual GUI editor bundled with Qt Creator. It defines the widget hierarchy, properties, signal/slot connections, and resource references that make up a Qt Widgets dialog or window - but is a design-time artifact only and is never deployed at runtime.
The file begins with a standard XML declaration followed by a <ui version="4.0"> root element. Inside, a <widget> tree mirrors the widget hierarchy, each node carrying <property> elements for geometry, text, fonts, and other attributes. Signal/slot connections are listed in a <connections> block; custom widget registrations appear under <customwidgets>; embedded resource aliases sit in <resources>.
At build time, Qt's uic (User Interface Compiler) reads the .ui file and generates a C++ header - for example, ui_mainwindow.h - that instantiates and configures all widgets. This generated header is #included by the corresponding .cpp implementation file. The XML schema has been stable since Qt 4 (2005) and is fully supported across Qt 5 and Qt 6; all three versions retain the version="4.0" attribute string for backward compatibility.
For modern .qml-based Qt Quick interfaces, .ui files are not used. They remain the standard for traditional Qt Widgets applications on Windows, Linux, macOS, Android, iOS, and embedded targets. Qt Designer (also available as a standalone tool) and any plain-text XML editor can open .ui files.
Security & safety
RISK: LOW.ui files are plain XML and pose no execution risk when opened in a text editor. In a build environment, uic-generated code is compiled into the application - but the .ui file itself contains no executable code; all logic is in the .cpp companion.
Format details
in a nutshell- FLUID (FLTK User Interface Designer) file - FLTK's FLUID tool uses .fl files primarily but some older projects or variants may use .ui for FLTK GUI descriptions.
- Generic UI description / other frameworks - Some other GUI toolkits (wxFormBuilder, Glade for GTK) may use .ui extension; Glade XML files for GTK are also .ui (GtkBuilder format).
Programs that open UI files
Technical details
deep spec| Container format | XML document (UTF-8 plain text) |
| Root element | <ui version="4.0"> - version string unchanged since Qt 4 for backward compatibility across Qt 4, 5, and 6 |
| Widget hierarchy | Nested <widget> elements with typed <property> children (geometry, text, font, palette, and more) |
| Signal/slot encoding | <connections> block listing sender object, signal name, receiver object, and slot name |
| Resource references | <resources> block listing .qrc file aliases for icons and other assets |
| Custom widget support | <customwidgets> block declaring class name, include header, and container flag for non-standard widgets |
| Build-time compilation | Qt's uic (User Interface Compiler) generates a C++ header (e.g. ui_mainwindow.h) from the .ui file at build time |
| Runtime deployment | Design-time file only; not deployed - compiled away into generated C++ code during build |
| MIME type | application/x-designer |
| Encoding | UTF-8 plain text; no binary sections |
| Platform support | Windows, Linux, macOS, Android (Qt for Android), iOS (Qt for iOS), embedded Linux |
| Project integration | Referenced by .pro / .pri project files via the FORMS variable; also supported via qt_add_ui() in Qt 6 CMake builds |
| Released | ~1999 (Qt Designer introduced with Qt 2.x) |
| Latest version | Qt 6 UI format (2020+); backward compatible with Qt 4/5 UI files |
| Open standard | Yes · royalty-free |
| Specification | doc.qt.io |
UI conversions
Community Q&A
asked by usersNo questions yet - be the first to ask about UI files.