Qt Quick Controls Styles

The Qt Quick Controls Styles submodule allows custom styling for Qt Quick Controls.

The submodule is new in Qt 5.1.

Getting started

The QML types can be imported into your application using the following import statement in your .qml file.


  import QtQuick.Controls.Styles 1.4

Styles

Base Style

The Base Style is the default style used when none is specified. It is also used as a fallback when the specified style cannot be found.

The Base Style Tumbler.

Flat Style

The Flat Style is designed for touch devices.

The Flat Style Tumbler.

Selecting Styles

You can apply a different style to the controls by setting the QT_QUICK_CONTROLS_STYLE environment variable to the name of the style. For example, to use the Flat style, you can do the following:


  QT_QUICK_CONTROLS_STYLE=Flat ./app

This can also be done in C++, using qputenv():


  qputenv("QT_QUICK_CONTROLS_STYLE", "Flat");

Styling Views

TableViewStyle

Provides custom styling for TableView

TreeViewStyle

Provides custom styling for TreeView

Styling Controls

TableViewStyle

Provides custom styling for TableView

TreeViewStyle

Provides custom styling for TreeView

Styling Tutorials

Styling CircularGauge

Tutorial for styling CircularGauge.

Styling Gauge

Tutorial for styling the Gauge control.