组件
ShadcnRadio / ShadcnRadioGroup
单选组:16px 正圆,选中 primary + 内圆点,同组互斥。

单选按钮组:16px 正圆,选中 primary 底 + primaryForeground 内圆点;同组互斥、方向键切换。
用法
ShadcnRadioGroup {
ShadcnRadio { text: qsTr("默认主题"); checked: true }
ShadcnRadio { text: qsTr("蓝色主题") }
ShadcnRadio { text: qsTr("绿色主题") }
}
属性
| 组件 | 属性 | 说明 |
|---|---|---|
ShadcnRadioGroup | buttons / checkedButton | 暴露 QQC ButtonGroup(查询选中项) |
ShadcnRadio | text / checked / enabled | 选项文本 / 选中 / 禁用 |
说明
- 基于 QQC.RadioButton + ButtonGroup(exclusive),键盘方向键 / 上下切换
- 16px 正圆 + border +
bg-input/90;选中 primary 底 + 8px primaryForeground 内圆点 - 聚焦 border-ring + 3px 外环
- 组内互斥由 onCompleted 手动收集子项到 ButtonGroup
