在本页

Qt Labs StyleKit QML Types

该模块正在开发中,可能会有变动。

Qt Labs StyleKit模块为Qt Quick 控件的声明式样式化提供了 QML 类型。StyleKit 可让您通过单个样式对象为所有控件定义完整的可视化样式,包括支持主题、基于状态的样式化和过渡。

可在 .qml 文件中使用以下导入语句将 QML 类型导入应用程序:

import Qt.labs.StyleKit

QML 类型

AbstractStylableControls

抽象基本类型,包含可被样式化的控件类型

AbstractStyle

具有样式和主题共同属性的抽象基本类型

BorderStyle

定义委托的边框样式

ControlStateStyle

描述一个控件在给定状态下的样式

ControlStyle

定义正常状态下控件的样式

ControlStyleProperties

定义控件的可样式属性

CustomControl

为自定义(非内置)控件定义样式

CustomTheme

定义已命名的自定义主题

DelegateStyle

定义控件中元素的视觉外观

HandleStyle

为开关、滑块和范围滑块等控件定义句柄样式

ImageStyle

定义委托的图像样式

IndicatorStyle

定义控件指示器的样式

ShadowStyle

为委托定义阴影样式

Style

样式定义的根类型

StyleAnimation

在状态转换期间动画样式属性变化

StyleKit

用于设置和访问当前样式的单例

StyleKitDebug

跟踪控件样式属性的解析过程

StyleReader

从特定控件的活动样式中读取属性

StyleVariation

为特定控件定义替代样式

StyledItem

渲染委托样式

SubIndicatorStyle

定义子指示器委托的样式

TextStyle

定义控件标签的文本样式

Theme

为颜色方案定义颜色和样式重载

注意: Qt.labs 模块中的类型不保证在未来版本中保持兼容。

© 2026 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.