- Qt 6.11
- All Overviews
- User Interfaces
- Qt 6.11.1 Reference Documentation

User Interface Compiler (uic) ◦ Desktop Integration

# User Interfaces

The Qt framework's main user interface technologies are Qt Quick and Qt Widgets. Qt Quick interfaces are fluid, dynamic, and are best on touch interfaces. Qt Widgets are for creating complex desktop applications. You can create Qt Quick and Qt Widgets interfaces with the target platform's native look and feel.

## Building UIs with Qt Quick

Qt Quick is for creating dynamic and fluid user interfaces. The Qt Quick Controls module supplies QML types such as buttons, dialogs, and menus. You can use QML, a declarative language, to build the UI and JavaScript to implement the logic.

The following list contains related overviews:

- Qt Quick Controls
- Getting started with Qt Quick applications
- First Steps with QML
- Glossary Of QML Terms
- Visual types
- Positioners and layouts
- Handling user input
- Displaying text
- Animations
- Integrating JavaScript in QML
- Qt Quick 3D - add-on for 3D graphics
- Qt Shader Tools - add-on shader effects

## Qt Widgets User Interfaces

Qt Widgets are the user interface elements that are typical in desktop environments. The widgets integrate well to the underlying platform providing native look and feel on Windows, Linux and macOS. The widgets are mature and feature rich user interface elements suitable for mostly traditional user interfaces. In contrast to Qt Quick, the widgets are for creating large desktop applications and less suited for creating touch-centric applications with fluid interfaces.

The following list contains related overviews for Qt Widgets:

- Widgets Classes
- Animation Framework
- Application Main Window
- Dialog Windows
- Drag and Drop
- Gestures in Widgets and Graphics View
- Layout Management
- Window and Dialog Widgets
- Styles and Style Aware Widgets

## Comparison of UI Technologies

The following table provides a comparison of Qt Quick and Qt Widgets, highlighting their strengths, limitations, and ideal use cases:

Feature | Qt Quick and Qt Quick Controls | Qt Widgets | Explanation
--- | --- | --- | ---
Primary languages | QML and JavaScript | C++ | Qt Quick is declarative. Qt Widgets is imperative, classic C++.
Native look and feel | Yes (via Qt Quick Controls styles). | Yes (native desktop widgets). | Both support native look and feel on their target platforms.
Custom styling | Yes (customizable styles, custom QML components). | Yes (Qt Style Sheets). | Both frameworks allow extensive custom styling through different mechanisms.
Fluid animations and transitions | Yes (GPU-accelerated animations built-in). | Limited (supported via QPropertyAnimation, but not designed for fluid UI animation). | Qt Quick is designed for animated, modern UIs. Qt Widgets are not.
Touch support | Yes (designed for touch and gestures). | Limited (touch events exist but Qt Widgets assume mouse and keyboard input). | Qt Quick handles multimodal input better. Qt Widgets require more manual work for good touch UX.
Standard industry widgets | Yes (provides common desktop controls, and custom components can implement any required widget). | Yes (rich set of mature, ready-made desktop widgets). | Qt Quick can implement all types of desktop controls, but Qt Widgets include a wider set of traditional widgets out of the box.
Model/View programming | Yes (flexible model support with delegate-based views such as ListView and TableView). | Yes (comprehensive set of classic MVC views, including QTableView, QListView, and QTreeView). | Both technologies support robust model/view programming. Qt Quick uses delegates to clearly separate data from presentation, while Qt Widgets provide a large set of mature, ready-made model/view classes.
Rapid UI prototyping | Yes (very fast iteration in QML). | Yes (fast for traditional UIs, escpecially with Qt Widgets Designer). | Qt Quick is particularly well-suited for rapid visual prototyping, while Qt Widgets allow quick assembly of classic desktop interfaces using Qt Widgets Designer.
Hardware-accelerated graphics | Yes (GPU-accelerated via Qt Quick Scene Graph). | Partially (widgets render in software. OpenGL widgets possible but isolated). | Only Qt Quick provides built-in full-scene GPU acceleration. See Graphics for more information.
Graphical effects | Yes (shader-based blur, glow, drop shadow, color effects, and more). | Limited (basic effects via Qt GUI only). | Qt Quick offers rich, GPU-driven visual effects. Qt Widgets offer only simple CPU effects.
Rich text processing. | Yes (Qt's rich text document classes can be utilized in Qt Quick and Qt Quick Controls' TextArea, but may require some C++ implementation). | Yes (complete support through QTextDocument, QTextEdit, and related classes). | Both technologies can be used to build complex text editors. Qt Quick integrates with Qt’s rich text engine via QTextDocument, while Qt Widgets provide a mature set of ready-to-use classes for text handling.

Note: You can display QML views in a Qt Widgets UI. For more information, see Qt Quick Widgets.

## Related Topics

The following pages contain more information about designing and developing user interfaces:

- Design Tools - overview of user interface tools for designers and developers
- Graphics - graphics overview
- Model/View Programming
- High DPI

User Interface Compiler (uic) ◦ Desktop Integration