QtShadcn
组件

ShadcnSeparator

分隔线:水平 / 竖直 / 带文字分隔。

分隔线:水平、竖直、带文字分隔。

用法

// 水平分隔线
ShadcnSeparator { width: parent.width }

// 带文字的分隔线
ShadcnSeparator { text: qsTr("或") }

// 竖直分隔线
ShadcnSeparator { orientation: Qt.Vertical; height: 60 }

视觉

  • 1px 细线,颜色跟随 theme.border
  • 带文字时分隔线两端等宽,文字居中(12px muted 色)
  • 竖直模式下高度自适应

相关

  • 表单分组、卡片内区域分隔、登录页「或」分隔
Copyright © 2026