HusCaptionButton 标题按钮
January 26, 2026 · View on GitHub
HusCaptionButton 标题按钮
一般用于窗口标题栏的按钮。
-
模块 { HuskarUI.Basic }
-
继承自 { HusIconButton }
支持的代理:
- 无
支持的属性:
| 属性名 | 类型 | 默认值 | 描述 |
|---|---|---|---|
| isError | bool | false | 是否为警示按钮 |
| noDisabledState | bool | false | 无禁用状态(即被禁用时不会更改颜色) |
代码演示
示例 1
通过 isError 属性设置为警示按钮,例如关闭按钮。
import QtQuick
import HuskarUI.Basic
Row {
spacing: 15
HusCaptionButton {
iconSource: HusIcon.CloseOutlined
}
HusCaptionButton {
isError: true
iconSource: HusIcon.CloseOutlined
}
HusCaptionButton {
text: qsTr('关闭')
colorText: colorIcon
iconSource: HusIcon.CloseOutlined
}
}