警告: 从 Qt 5.12 起弃用 Qt Quick Controls 1 模块。使用最新 Qt Quick Controls 模块代替。
The Qt Quick Controls Styles submodule allows custom styling for Qt Quick Controls 1 .
The submodule was introduced in Qt 5.1.
The QML types can be imported into your application using the following import statement in your
.qml
文件。
import QtQuick.Controls.Styles 1.4
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 Flat Style is designed for touch devices.
You can apply a different style to the controls by setting the QT_QUICK_CONTROLS_1_STYLE environment variable to the name of the style. For example, to use the Flat style, you can do the following:
QT_QUICK_CONTROLS_1_STYLE=Flat ./app
This can also be done in C++, using qputenv ():
qputenv("QT_QUICK_CONTROLS_1_STYLE", "Flat");
Provides custom styling for ScrollView | |
Provides custom styling for TabView | |
Provides custom styling for TableView | |
Provides custom styling for TreeView |
Tutorial for styling CircularGauge. | |
Tutorial for styling the Gauge control. |