Back to Blog home

Qt Quick Controls 2.0 - a new beginning!

Published on Friday June 10, 2016 by J-P Nurmi in Qt Quick Controls | Comments

Qt Quick Controls 2.0 has come a long way since its first technology preview release with Qt 5.6. It provides a more mature set of controls, which are not based on Qt Quick Controls 1 and are redesigned from scratch to gain a significant performance boost. Enough has already been said about the bottlenecks with Qt Quick Controls 1 and its complicated design to support a whole variety of use cases, so let's not dig into it again. But if you are interested, refer to these blog posts:

The new version 2.0 of Qt Quick Controls enables designing lighter user interfaces, which is a key requirement these days for developing applications that behave well even on environments with limited resources. The APIs provided by the new controls take a more declarative approach, for instance, using attached properties extensively. They also provide more advanced and low-level features such as inheriting font, locale, and style. Such features were supported by Qt Widgets since day one, but they never existed in Qt Quick Controls 1.

Qt Quick Controls 2 is shipped with three styles: Default, Material, and Universal. The latter two are based on Google's Material and Microsoft's Universal styles, which are platform- and device-agnostic designs with publicly available specifications. They fit well to the notion, "one template, one behavior, multiple design languages / styles", that Qt Quick Controls 2 builds upon. There are no native styles in Qt Quick Controls 2 - all styles are cross-platform and look the same on all platforms. Here is a preview of these styles in action:

qtquickcontrols-styles

You could style a single control in your application to give it a different look than what is offered by these styles. In fact, the new controls also enable creating complete style-sets that could be applied to all or several instances of controls used in your application. See the Qt Quick Controls 2 customization instructions for more details.

The following is a video of an application that simulates a coffee machine use case with Qt Quick Controls 2.

[embed]https://youtu.be/a56XtlGySVM[/embed]
With the Qt 5.7 release, the new controls graduates to a fully supported module, after being in the works for almost 1.5 years. Try the Qt 5.7.0 RC to explore the new possibilities with Qt Quick Controls 2!

Subscribe to Our Blog

Stay up to date with the latest marketing, sales and service tips and news.

The blog comment system has been migrated to a new platform. If you face any issues, please let us know via feedback@qt.io.