AbstractStyle QML Type
抽象基本类型,具有Style 和Theme 的共同属性。更多
| Import Statement: | import Qt.labs.StyleKit |
| Inherits: | |
| Inherited By: |
属性
详细说明
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.