Qt Quick Controls Re-engineered – Status Update

By Mitch Curtis

material

Since announcing research on Qt Quick Controls optimized for embedded use, we’ve made good progress towards achieving feature parity with the original Qt Quick Controls. We’ve also added some new controls that didn’t exist (Drawer, RangeSlider, and SwipeView, to name a few).

The previous blog post cited performance reasons as the motivation for having one fixed style. However, we have found a way to make multiple styles available without sacrificing performance. So far, two new styles have been merged, implementing both Google’s Material Design and Microsoft’s Universal Design.

Material style

universal

Universal style

It’s important to note that these styles are not claiming to be native, but instead a 100% cross-platform implementation of the Material and Universal design guidelines. For example, the Material style does not adapt to any Sony or Samsung theme on Android. You can run these styles on any platform and they will look more or less identical.

We’re also working on a neutral, optimised base style, and a fancier “Qt” style, both in cooperation with our designers.

Earlier, we talked about separating the C++ logic and the visual QML layer. Thanks to the feedback from our users, we have realized the power of a pure C++ logic layer and have decided to expose it separately for those wanting to build their own custom user experience. We’ve named this layer “templates”. A template is the foundation of a control. They encapsulate the behaviour of controls and provide an interface for styles to do their thing, allowing a true separation of concerns. For an introduction to this concept, take a look at the following video taken from the 2015 Qt World Summit:

The styling system now uses a technique similar to file selectors to choose which style to load at application startup. There are currently two ways to choose the application style:

  • An environment variable:
    QT_LABS_CONTROLS_STYLE=universal
  • The “-style” application argument:
    -style material

A manifest file for specifying the preferred style and style-specific attributes is also being considered as a future addition.

The more complex beasts like TableView and TreeView are on our to-do list. We realise that these are some of the most important controls, remaining quite relevant even on touch devices. Given the great opportunity that we have (to completely redesign all of the controls), we’d like to take the time to design these particular controls to be as lean as …read more

Source:: http://blog.qt.io/blog/2015/11/23/qt-quick-controls-re-engineered-status-update/

      

Leave a Reply