Qt Widgets or Qt Quick: Choosing a UI Technology
Qt is a C++ framework for building applications that run on Windows, macOS, Linux, mobile platforms and embedded devices from one codebase. It offers two ways to build the user interface. Qt Widgets is the long-established set of C++ desktop controls. Qt Quick uses QML, a declarative language, rendered through a GPU-accelerated scene graph. Both share the same core libraries, so the decision concerns the interface, not the whole application.
At a glance
- Widgets
- C++ controls with platform-appropriate styles, mature and stable for desktop tools.
- QML
- The declarative language of Qt Quick, with JavaScript for bindings and small pieces of logic.
- Scene graph
- Qt Quick renders through the GPU, which keeps animation and touch interaction smooth.
- Qt 6
- The current major version, which renders over Direct3D, Metal, Vulkan or OpenGL.
The problem
Choosing on familiarity alone causes trouble later. A touchscreen product built with Widgets fights the toolkit for animation, gestures and custom visual design. A data-heavy engineering tool built in Qt Quick can spend effort recreating tables, trees and docking layouts that Widgets provides ready-made.
The rendering model matters on hardware too. Qt Quick expects a GPU for good performance, while Widgets renders well in software, which can settle the question on a low-cost processor without graphics acceleration.
Choose Widgets for dense desktop tools and Qt Quick for designed, animated or touch interfaces. Keep the logic in C++ either way.
Mixing the two
The two technologies are not exclusive. A Widgets application can embed Qt Quick content with QQuickWidget, and both can share C++ models and controllers. Keeping business logic in C++ classes exposed to the UI makes either front end replaceable.
Licensing applies to both. Qt is available under commercial licences and under open-source licences, mainly LGPLv3 with some modules under GPL only. Check the licence of each module you use, particularly for locked-down devices, where LGPLv3 obligations need planning.
What good looks like
Describe the interface: input method, screen sizes, how much animation and custom styling, and whether a GPU is available on every target.
Prototype the hardest screen in the candidate technology on the slowest target hardware before committing the whole project.
Separate logic from presentation with C++ models and controllers, so the UI layer stays thin and testable.
| Qt Widgets | Qt Quick | |
|---|---|---|
| Dense desktop controls | Comprehensive | Fewer, more effort |
| Animation and effects | Limited | Built in |
| Touch and gestures | Basic | First class |
| Without a GPU | Renders well | Needs the software backend |
| Custom visual design | Style sheets and painting | Declarative and flexible |
| Product | Usual choice | Why |
|---|---|---|
| Engineering or test tool on desktop | Qt Widgets | Tables, trees, menus and docking ready-made |
| Touchscreen device interface | Qt Quick | Touch, animation and GPU rendering |
| Branded consumer desktop app | Qt Quick | Custom look without native styling |
| Display on a board without a GPU | Widgets, or Qt Quick software backend | Software rendering performance |
| Widgets product adding a dashboard | Both, via QQuickWidget | Incremental adoption |
What it changes
Right Fit
The toolkit matches how the interface is used, so the team works with it rather than around it.
Performance
Rendering suited to the hardware gives smooth interaction on the targets that matter.
Designer Workflow
Qt Quick lets designers and developers work on the same QML components.
Longevity
Logic kept in C++ survives a later change of UI technology.
Where to go next
For desktop tools with heavy tables, forms and docking windows, Widgets remains a strong, supported choice. It is not deprecated.
For embedded and touch products, Qt Quick with Qt Quick Controls is the usual starting point, with a platform plugin chosen to suit the display hardware.
Problems this prevents
- A touch interface fighting a desktop toolkit
- Rebuilding desktop controls by hand
- A GPU-dependent UI on hardware without one
- Business logic tangled into UI code
Discuss your project
Email support@aavico.com or use Get in Touch when the website finishes loading.