HusFrame 框架

September 5, 2026 · View on GitHub

← 返回主目录

← 返回本类别目录

HusFrame 框架

逻辑控件组的视觉框架。

  • 模块 { HuskarUI.Basic }

  • 继承自 { Frame }


支持的代理:


支持的属性:

属性名类型默认值描述
colorBgcolor-背景颜色
radiusBgHusRadius-背景圆角
borderBgHusBorder-背景边框

代码演示

示例 1

使用方法等同于 Frame

import QtQuick
import QtQuick.Layouts
import HuskarUI.Basic

Column {
    spacing: 15

    HusFrame {
        padding: 20

        HusSpace {
            anchors.fill: parent
            layout: 'ColumnLayout'
            spacing: 10

            HusCheckBox { text: 'E-mail '}
            HusCheckBox { text: 'Calendar' }
            HusCheckBox { text: 'Contacts' }
        }
    }

    HusFrame {
        padding: 20

        HusSpace {
            anchors.fill: parent
            layout: 'ColumnLayout'

            HusCard {
                Layout.fillWidth: true
                title: 'Card title'
                extraDelegate: HusButton { type: HusButton.Type_Link; text: 'More' }
                bodyDescription: 'Card content\nCard content\nCard content'
            }
            HusSpace {
                Layout.fillWidth: true
                layout: 'RowLayout'

                HusInput { text: 'https://github.com/mengps/HuskarUI' }
                HusButton { Layout.preferredWidth: 80; type: HusButton.Type_Primary; text: 'Submit' }
            }
            HusSpace {
                Layout.fillWidth: true
                layout: 'RowLayout'

                HusInput { text: 'https://github.com/mengps/HuskarUI' }
                HusIconButton { Layout.preferredWidth: 80; iconSource: HusIcon.CopyOutlined }
            }
        }
    }
}