Pane QML Type

애플리케이션 스타일 및 테마와 일치하는 배경을 제공합니다. 더 보기...

Import Statement: import QtQuick.Controls
Inherits:

Control

Inherited By:

Frame, Page, ScrollView, and ToolBar

속성

자세한 설명

창은 애플리케이션 스타일 및 테마와 일치하는 배경색을 제공합니다. 창은 자체 레이아웃을 제공하지 않으며, 예를 들어 RowLayout 또는 ColumnLayout 을 만들어 콘텐츠를 배치해야 합니다.

창의 자식으로 선언된 항목은 자동으로 창의 contentItem 에 부모가 됩니다. 동적으로 생성된 항목은 명시적으로 contentItem 에 부모가 되어야 합니다.

Event Handling 에서 언급했듯이 창은 클릭 및 터치 이벤트를 그 아래 항목으로 전달하지 않습니다. wheelEnabledtrue 인 경우 마우스 휠 이벤트에도 동일하게 적용됩니다.

콘텐츠 크기 조정

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

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

때때로 창 안에 두 개의 항목이 있을 수 있습니다:

Pane {
    SwipeView {
        // ...
    }
    PageIndicator {
        anchors.horizontalCenter: parent.horizontalCenter
        anchors.bottom: parent.bottom
    }
}

이 경우 창은 합리적인 암시적 크기를 계산할 수 없습니다. PageIndicatorSwipeView 에 앵커링하고 있으므로 콘텐츠 크기를 뷰의 암시적 크기로 설정하면 됩니다:

Pane {
    contentWidth: view.implicitWidth
    contentHeight: view.implicitHeight

    SwipeView {
        id: view
        // ...
    }
    PageIndicator {
        anchors.horizontalCenter: parent.horizontalCenter
        anchors.bottom: parent.bottom
    }
 }

contentItem 에 암시적 크기가 없고 자식이 하나만 있는 경우 Pane은 해당 자식의 암시적 크기를 사용합니다. 예를 들어 다음 코드에서 창은 직사각형의 크기를 가정합니다:

Pane {
    Item {
        Rectangle {
            implicitWidth: 200
            implicitHeight: 200
            color: "salmon"
        }
    }
}

Qt Quick ControlsEvent Handling 에서창 사용자 지정, 컨테이너 컨트롤, 포커스 관리를참조하세요 .

속성 문서

contentChildren : list<Item>

이 속성은 콘텐츠 자식 목록을 보유합니다.

이 목록에는 QML에서 패널의 자식으로 선언된 모든 항목이 포함됩니다.

참고: contentData 과 달리 contentChildren 에는 시각적이지 않은 QML 개체가 포함되지 않습니다.

Item::childrencontentData참조하세요 .


contentData : list<QtObject> [default]

이 속성은 콘텐츠 데이터의 목록을 보유합니다.

이 목록에는 QML에서 창의 자식으로 선언된 모든 개체가 포함됩니다.

참고: contentChildren 과 달리 contentData 에는 비시각적 QML 개체가 포함됩니다.

Item::datacontentChildren참조하세요 .


contentHeight : real

이 속성은 콘텐츠 높이를 보유합니다. 이 속성은 창의 총 암시적 높이를 계산하는 데 사용됩니다.

자세한 내용은 Content Sizing 을 참조하십시오.

contentWidth도 참조하십시오 .


contentWidth : real

이 속성은 콘텐츠 너비를 보유합니다. 창의 총 암시적 너비를 계산하는 데 사용됩니다.

자세한 내용은 Content Sizing 을 참조하십시오.

contentHeight참조하세요 .


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