AbstractStyle QML Type
一种抽象基类,兼具Style 和Theme 的共同属性。更多内容...
| Import Statement: | import Qt.labs.StyleKit |
| Inherits: | |
| Inherited By: | |
| Status: | Technology preview |
此类型处于技术预览阶段,可能会有变动。
属性
详细说明
AbstractStyle 包含一些属性(例如字体和配色方案),这些属性在 `Style ` 和 `Theme` 中都是通用的。
注意: Qt.labs 模块中的类型在未来版本中不保证保持兼容性。
属性文档
fonts : StyleFont
用于配置每个控件的fonts 的分组属性。可以为按钮、文本字段或标签等单个控件类型设置字体。
Style {
fonts {
system.pixelSize: 14
button.bold: true
textField.family: "Monospace"
}
}palettes : StylePalette
用于配置每个控件的palettes 的分组属性。调色板可在全系统范围内设置,也可针对特定控件类型进行设置。
light: Theme {
palettes {
system {
window: "gainsboro"
windowText: "black"
}
button.buttonText: "black"
textField.text: "#4e4e4e"
}
}© 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.