GroupBox QML Type

논리적 컨트롤 그룹에 대한 시각적 프레임 및 제목. 더 보기...

Import Statement: import QtQuick.Controls
Inherits:

Frame

속성

자세한 설명

GroupBox는 titled 시각적 프레임 내에서 논리적 컨트롤 그룹을 함께 레이아웃하는 데 사용됩니다. GroupBox는 자체 레이아웃을 제공하지 않으며, 예를 들어 RowLayout 또는 ColumnLayout 을 생성하여 콘텐츠의 위치를 지정해야 합니다.

그룹상자의 자식으로 선언된 항목은 자동으로 그룹상자의 contentItem 에 부모가 됩니다. 동적으로 생성된 항목은 contentItem에 명시적으로 부모를 지정해야 합니다.

그룹박스 내에서 하나의 항목만 사용되는 경우 포함된 항목의 암시적 크기에 맞게 크기가 조정됩니다. 따라서 레이아웃과 함께 사용하기에 특히 적합합니다.

GroupBox {
    title: qsTr("Synchronize")
    ColumnLayout {
        anchors.fill: parent
        CheckBox { text: qsTr("E-mail") }
        CheckBox { text: qsTr("Calendar") }
        CheckBox { text: qsTr("Contacts") }
    }
}

체크 가능한 그룹박스

GroupBox에는 내장된 확인란이 없지만 CheckBox 와 쌍을 이루어 확인 가능한 GroupBox를 만드는 것은 간단합니다.

체크박스를 켜거나 끌 때 그룹박스의 하위 항목을 활성화 또는 비활성화하는 것이 일반적인 패턴이지만 체크박스의 동작을 결정하는 것은 애플리케이션에 달려 있습니다.

GroupBox {
    label: CheckBox {
        id: checkBox
        checked: true
        text: qsTr("Synchronize")
    }

    ColumnLayout {
        anchors.fill: parent
        enabled: checkBox.checked
        CheckBox { text: qsTr("E-mail") }
        CheckBox { text: qsTr("Calendar") }
        CheckBox { text: qsTr("Contacts") }
    }
}

CheckBox, 그룹박스 사용자 지정하기컨테이너 컨트롤을참조하세요 .

속성 문서

implicitLabelHeight : real [read-only, since QtQuick.Controls 2.5 (Qt 5.12)]

이 속성은 암시적 레이블 높이를 보유합니다.

값은 label ? label.implicitHeight : 0 입니다.

이 프로퍼티는 QtQuick.Controls 2.5 (Qt 5.12)에 도입되었습니다.

implicitLabelWidth참조하십시오 .


implicitLabelWidth : real [read-only, since QtQuick.Controls 2.5 (Qt 5.12)]

이 속성은 암시적 레이블 너비를 보유합니다.

값은 label ? label.implicitWidth : 0 입니다.

이 프로퍼티는 QtQuick.Controls 2.5 (Qt 5.12)에 도입되었습니다.

implicitLabelHeight도 참조하십시오 .


label : Item

이 속성은 title 을 시각화하는 레이블 항목을 보유합니다.

그룹 상자 사용자 지정하기를참조하십시오 .


title : string

이 속성은 제목을 저장합니다.

제목은 일반적으로 그룹 상자 위에 표시되어 내용을 요약합니다.


© 2025 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.